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
Which RDBMS or Data Structure I should use?
This project will be done in 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.