Date |Sat, 4 Aug 2001 12:53:15 +0100
>From |"Tadej Guzej" <[EMAIL PROTECTED]>

Hello!


TG> What is better:
TG> CREATE INDEX ix1(field1, field2, field3);
TG> or
TG> CREATE INDEX ix1(field1), ix2(field2), ix3(field3);
TG> I have a large table of some 30,000,000 records and am wondering
TG> which indexing gives better performance and why.

TG> How do I optimize search on this table - I'm using lots of OR statements in WHERE 
clause.
TG> Thanks in advance,

Quote:
MySQL uses multiple-column indexes in such a way that queries are fast when you 
specify a known quantity for the first column of the index in a WHERE clause, even if 
you don't specify values for the other columns. 

http://www.mysql.com/doc/M/u/Multiple-column_indexes.html


___________________________________________________________________
For technical support contracts, visit https://order.mysql.com/
This email is sponsored by SWSoft, http://www.asplinux.ru/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Grigory Bakunov <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB / SWSoft
/_/  /_/\_, /___/\___\_\___/
       <___/   www.mysql.com


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