Hi Don.

On Sat, Jul 21, 2001 at 03:28:45PM -0500, [EMAIL PROTECTED] wrote:
[...]
> > There is one exception, though, there are compound keys, which will be
> > of use. So,
> > 
> > INDEX(id), INDEX(id)
> > 
> > makes no sense, but 
> > 
> > IDNEX(id), INDEX(id,ordernr) 
> > 
> > may make sense. 
> > 
> 
> Benjamin, I'll pick a nit here. 
> A query on id only can use either index, a query on id & ordernr could
> also use both indexes but the second one would be more useful.
> A query on ordernr only can't use either, and will result in a full scan.
> 
> ITYM:
>  INDEX(id), INDEX(ordernr,id)

Of course, you are right. I was sloppy in my example.

Best regards,

        Benjamin.


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