List:General Discussion« Previous MessageNext Message »
From:Carsten Pedersen Date:July 10 2012 6:21pm
Subject:Re: Fwd: Query take too long time - please help!
View as plain text  
On 10.07.2012 13:16, Darek Maciera wrote:
> 2012/7/10 Ananda Kumar <anandkl@stripped>:
>> can u show the explain plan for your query
>>
>
> Thanks, for reply!
>
> Sure:
>
> mysql> EXPLAIN SELECT * FROM books WHERE LOWER(ksd)=LOWER('4204661375');

That's definitely not the query you showed the first time around. The 
query you're showing here will force a table scan to calculate 
LOWER(ksd) for every single row.

Also, how do you know that ksd id unique (as stated in your original 
post)? You have no index on it to ensure uniqueness.

You'll have to find some other way to query the table.

Best,

/ Carsten
Thread
Fwd: Query take too long time - please help!Darek Maciera10 Jul
  • Re: Query take too long time - please help!Ananda Kumar10 Jul
  • Re: Fwd: Query take too long time - please help!Carsten Pedersen10 Jul
    • RE: Fwd: Query take too long time - please help!Rick James16 Jul