简体   繁体   English

我应该使用哪种RDBMS或数据结构?

[英]Which RDBMS or Data Structure I should use?

I want to build an index of the needles for performance reason. 出于性能原因,我想建立一个指针。

There are hundreds of needles with very random characters from the binary files. 二进制文件中有数百个带有非常随机字符的针。

I need to compare a haystack against hundreds of needles. 我需要将干草堆与数百根针进行比较。 If the matching pattern found then it will need to return a needle content. 如果找到匹配模式,则需要返回针头内容。

For Example 例如

$haystack = "£$%^&DFFFD$%^&*("


Needles:
    1 | £"$£AAAA"£$
    2 | ((*BHJJ£$£$
    3 | ^&DFFFD$
    4 | &&&&&HUIH"£$%

It should return ^& DFFFD $% from ID 3 它应该从ID 3返回^& DFFFD $%

Which RDBMS or Data Structure I should use? 我应该使用哪种RDBMS或数据结构?

This project will be done in PHP 该项目将用PHP完成

I would go with hashing with chaining for needles. 我会去用链式针的散列。

when i get a haystack i create a list of all possibile needles ,compute it hash and compare it with the already computed needles hash values. 当我到大海捞针时,我会创建所有可能的针头列表,将其计算为哈希值,并将其与已经计算出的针头哈希值进行比较。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM