On 21 Sep 2007, at 10:25, K J wrote:

What I meant was, suppose I have a Memached list of 1000 IDs. Now I want to search that list to see if ID 234 is in that list or not. My program logic would have to iterate through that entire list correct? Whereas MySQL would use its index to find it quickly.

Yes, but it's probably built in to your language and thus an awful lot faster to do an isset() / in_array() or array_key_exists() (PHP) on an array that you have in hand than to have a trip to the DB. In fact the language may index arrays internally anyway. MySQL with an index will be faster than MySQL without an index, but it will still be much slower than local array searching.

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of [EMAIL PROTECTED] CRM solutions
[EMAIL PROTECTED] | http://www.synchromedia.co.uk/


Reply via email to