database vs flat file, which is a faster structure for "regex" matching with many simultaneous reque

Posted by Jamex on Stack Overflow See other posts from Stack Overflow or by Jamex
Published on 2010-05-22T08:40:50Z Indexed on 2010/05/22 16:10 UTC
Read the original article Hit count: 238

Filed under:
|
|
|

Hi, which structure returns faster result and/or less taxing on the host server, flat file or database (mysql)?

Assume many users (100 users) are simultaneously query the file/db. Searches involve pattern matching against a static file/db. File has 50,000 unique lines (same data type). There could be many matches. There is no writing to the file/db, just read.

Is it possible to have a duplicate the file/db and write a logic switch to use the backup file/db if the main file is in use?

Which language is best for the type of structure? Perl for flat and PHP for db?

Addition info:

If I want to find all the cities have the pattern "cis" in their names. Which is better/faster, using regex or string functions?

Please recommend a strategy

TIA

© Stack Overflow or respective owner

database vs flat file, which is a faster structure for regex matching with many simultaneous request

Posted by Jamex on Stack Overflow See other posts from Stack Overflow or by Jamex
Published on 2010-05-22T08:40:50Z Indexed on 2010/05/22 8:50 UTC
Read the original article Hit count: 238

Filed under:
|
|
|

Hi, which structure returns faster result and/or less taxing on the host server, flat file or database (mysql)?

Assume many users (100 users) are simultaneously query the file/db. Searches involve pattern matching using regex against a static file/db. File has 50,000 unique lines (same data type). There could be many matches. There is no writing to the file/db, just read.

Is it possible to have a duplicate the file/db and write a logic switch to use the backup file/db if the main file is in use?

Which language is best for the type of structure? Perl for flat and PHP for db?

TIA

© Stack Overflow or respective owner

Related posts about database

Related posts about regex