Benjamin Pflugmann wrote:
> If you have 256MB, the one may fit into memory,
> the other may not and therefore requires additional disk reads.     

Ah, see.. I hadn't thought of disk reads.  I was thinking if you do a
select on a char[50] and the whole field is indexed, wouldn't the search
algorithm know exactly where to go to look for a match, as opposed to -
if only the first 20 characters are indexed - finding all of the
possible values that match the first 20 and then having to go through
all of them looking for a match?  It would seem like, from what I know
of indexes, if the whole field is indexed, only one disk read should be
necessary since it would go right to that row the first time.  But I
admittedly have never peeked inside the mySQL source code, so maybe it
doesn't work that way...again not arguing, just looking for insight.

Thanks,
T

SQL MySQL

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to