Re: perforamnce

2001-08-06 Thread Grigory Bakunov

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




Re: perforamnce

2001-08-04 Thread Tadej Guzej

Well, sometimes I use all of the fields in the SELECT statement,
sometimes just one.
How about if I create both indexes?
How would it affect the performance? I don't care about update time as i
insert or update records at night only once a day.

Thanks for the answer

- Original Message -
From: "Kahled Al Sahmaa" <[EMAIL PROTECTED]>
To: "Tadej Guzej" <[EMAIL PROTECTED]>
Sent: Saturday, August 04, 2001 12:25 PM
Subject: Re: perforamnce


> Hello...
>
> that related to your select statement which you are use, if you have
> field1, field2 and field3 in the where section then the first index:
>
> CREATE INDEX ix1(field1, field2, field3);
>
> will be better for you, but if you are using select statements which has
been
> used one of that fields alon then the secound choice will be better.
>
>
>
> - Original Message -
> Subject: perforamnce
> Sent: Sat, 4 Aug 2001 12:53:15 +0100
> From: "Tadej Guzej" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> >
> >What is better:
> >
> >CREATE INDEX ix1(field1, field2, field3);
> >
> >or
> >
> >CREATE INDEX ix1(field1), ix2(field2), ix3(field3);
> >
> >I have a large table of some 30,000,000 records and am wondering
> >which indexing gives better performance and why.
> >
> >
> >How do I optimize search on this table - I'm using lots of OR statements
in
> WHERE clause.
> >
> >Thanks in advance,
> >
> >Tadej
> >
>
>
> Sincerely,
> Khaled Al-Sham'aa
> http://www.mazadmaktoob.com
>
> _
> Send Your favorite Arabic Card from Maktoob Cards,
http://cards.maktoob.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




perforamnce

2001-08-04 Thread Tadej Guzej


What is better:

CREATE INDEX ix1(field1, field2, field3);

or

CREATE INDEX ix1(field1), ix2(field2), ix3(field3);

I have a large table of some 30,000,000 records and am wondering
which indexing gives better performance and why.


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

Thanks in advance,

Tadej