Re: Fwd: Why dont my query use the index keys?

2008-09-19 Thread chandru
Hi joerg, that was a excellent explanation. Regards, Pradeep Chandru. Joerg Bruehe wrote: Hi ! Parikh, Dilip Kumar schrieb: Hi , So you are trying to say that 1) when the Table has Low Cardinality, Mysql wont use Index? Is this the logic behind your words? Extreme example: If

Re: Fwd: Why dont my query use the index keys?

2008-09-18 Thread Joerg Bruehe
Hi ! Parikh, Dilip Kumar schrieb: > > Hi , > > So you are trying to say that 1) when the Table has Low Cardinality, Mysql > wont use Index? Is this the logic behind your words? Extreme example: If you are manually looking up one entry from a list of five (say, in a cookbook), would you go th

Re: Fwd: Why dont my query use the index keys?

2008-09-18 Thread chandru
, 2008 11:36 AM To: Johan Thorvaldsson Cc: mysql@lists.mysql.com <mailto:mysql@lists.mysql.com> Subject: Re: Fwd: Why dont my query use the index keys? Hi Johan, the query is going for a temporary table creation "Using temporary; Using filesort" In case your s

RE: Fwd: Why dont my query use the index keys?

2008-09-18 Thread Parikh, Dilip Kumar
force the query to use the index. > > *Thanks & Regards,* > *Dilipkumar* > > > *From:* chandru [mailto:[EMAIL PROTECTED] > *Sent:* Thursday, September 18, 2008 12:23 PM > *To:* Parikh, Dilip Kumar > *Cc:* Johan Thorvaldsson; mysql@lists.mysql.com > *S

Re: Fwd: Why dont my query use the index keys?

2008-09-18 Thread Nagaraj S
lso looks like ok seems let me check, Please try >>> to send the output of global status. >>> >>>Show global status; >>> >>> >>> >>> Thanks & Regards, >>>Dilipkumar >>> >>>-Original Me

Re: Fwd: Why dont my query use the index keys?

2008-09-18 Thread chandru
PROTECTED] *Sent:* Thursday, September 18, 2008 12:23 PM *To:* Parikh, Dilip Kumar *Cc:* Johan Thorvaldsson; mysql@lists.mysql.com *Subject:* Re: Fwd: Why dont my query use the index keys? Hi Dilip, I dont think forcing MySQL to use Index can improve your performance. MySQL

Re: Fwd: Why dont my query use the index keys?

2008-09-18 Thread chandru
gards, Dilipkumar -Original Message- From: chandru [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2008 11:36 AM To: Johan Thorvaldsson Cc: mysql@lists.mysql.com <mailto:mysql@lists.mysql.com> Subject: Re: Fwd: Why dont my query use the index keys? H

Re: Fwd: Why dont my query use the index keys?

2008-09-18 Thread Nagaraj S
, Please try to send > the output of global status. > > Show global status; > > > > Thanks & Regards, > Dilipkumar > > -Original Message- > From: chandru [mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>] > Sent: Thursday, September 18, 2008 11:3

Re: Fwd: Why dont my query use the index keys?

2008-09-18 Thread Nagaraj S
, Please try to send > the output of global status. > > Show global status; > > > > Thanks & Regards, > Dilipkumar > > -Original Message- > From: chandru [mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>] > Sent: Thursday, September 18, 2008 11:3

RE: Fwd: Why dont my query use the index keys?

2008-09-18 Thread Parikh, Dilip Kumar
m: chandru [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2008 12:23 PM To: Parikh, Dilip Kumar Cc: Johan Thorvaldsson; mysql@lists.mysql.com Subject: Re: Fwd: Why dont my query use the index keys? Hi Dilip, I dont think for

Re: Fwd: Why dont my query use the index keys?

2008-09-17 Thread chandru
global status; Thanks & Regards, Dilipkumar -Original Message- From: chandru [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 18, 2008 11:36 AM To: Johan Thorvaldsson Cc: mysql@lists.mysql.com Subject: Re: Fwd: Why dont my query use the index keys? Hi Johan, the query is going

RE: Fwd: Why dont my query use the index keys?

2008-09-17 Thread Parikh, Dilip Kumar
aldsson Cc: mysql@lists.mysql.com Subject: RE: Fwd: Why dont my query use the index keys? Hi johan, U can use and try to write a query to use index in it (like use index(index name) before where condition. And other variables also looks like ok seems let me check, Please try to send the output of

RE: Fwd: Why dont my query use the index keys?

2008-09-17 Thread Parikh, Dilip Kumar
inal Message- From: chandru [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2008 11:36 AM To: Johan Thorvaldsson Cc: mysql@lists.mysql.com Subject: Re: Fwd: Why dont my query use the index keys? Hi Johan, the query is going for a temporary table creation "Using temporary; Using

Re: Why dont my query use the index keys?

2008-09-17 Thread chandru
Hi johan, you have allocated 4M for your sort buffer size is ok. So i feel that the query is loading more than 4MB of data so it is creating a temporary file to do a sorting. please try to put some logic into the query that you use to load the appropriate data. I find that the tag_id has a car

Re: Why dont my query use the index keys?

2008-09-17 Thread Johan Thorvaldsson
mysql> show global variables like 'sort%'; +--+-+ | Variable_name| Value | +--+-+ | sort_buffer_size | 4194296 | +--+-+ 1 row in set (0.01 sec) 18 sep 2008 kl. 08.05 skrev chandru: Hi Johan, the query is going for a t

Re: Fwd: Why dont my query use the index keys?

2008-09-17 Thread chandru
D]> Datum: ti 16 sep 2008 13.19.43 GMT+02:00 Till: "Johan Thorvaldsson" <[EMAIL PROTECTED]> Kopia: mysql@lists.mysql.com Ämne: Re: Why dont my query use the index keys? Hi Johan, Its doing a range based search, so its using index. regards anandkl On 9/16/08, Johan Thorvaldss