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: 297
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