开发者

How to speed up Flat File Database in PHP?

开发者 https://www.devze.com 2022-12-20 07:21 出处:网络
I noticed that ffdb in P开发者_Go百科HP are awfully slow. So how wouldI go about speeding up the ffdb without SQL?Flat file will become more slow the more data it\'s contain. This is because in order

I noticed that ffdb in P开发者_Go百科HP are awfully slow. So how would I go about speeding up the ffdb without SQL?


Flat file will become more slow the more data it's contain. This is because in order to get a data, the engine need to get all data first into memory, then select the requested data.

SQL database have random seek feature, because the data placement is in a known location, plus it have index table. That's why any SQL database is not affected with the number of data stored in it.

You can try sqlite if you need single file database. Firefox and Thunderbird use sqlite to store bookmark and browsing history.


Tokyo Cabinet is amazingly fast for key/value lookups. There is also the search addition (tyrant) that allows for more complex queries

http://1978th.net/tokyocabinet/ PHP implementation http://code.google.com/p/phptyrant/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号