Quick way to do data lookup in PHP

Posted by Ghostrider on Stack Overflow See other posts from Stack Overflow or by Ghostrider
Published on 2010-06-01T17:48:54Z Indexed on 2010/06/01 17:53 UTC
Read the original article Hit count: 215

Filed under:
|

I have a data table with 600,000 records that is around 25 megabytes large. It is indexed by a 4 byte key.

Is there a way to find a row in such dataset quickly with PHP without resorting to MySQL?

The website in question is mostly static with minor PHP code and no database dependencies and therefore fast. I would like to add this data without having to use MySQL if possible.

In C++ I would memory map the file and do a binary search in it. Is there a way to do something similar in PHP?

© Stack Overflow or respective owner

Related posts about php

Related posts about algorithm