List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:August 4 2001 4:39pm
Subject:RE: Query Not Using Indexing
View as plain text  
Hi!

>>>>> "Sinisa" == Sinisa Milivojevic <sinisa@stripped> writes:

Sinisa> Adam Douglas writes:
Sinisa> <cut>
>> 
>> Alright, but is there no way then to decrease my query time of 14 seconds
>> (includes 3 queries) to something more reasonable for use on-line? 10
>> seconds according to stats is the maximum limit.
>> 
>> Maybe I'm not understanding things correctly here, but I do not have a
>> Cartesian product since my query will only return 1 result. Cartesian is
>> when MySQL has to match row for row when tables do not have any relations
>> correct (in brief)?
>> 
>> Well that doesn't make sense to me, so how long should such a task take
>> then? I've ran it all night and still it wasn't finished, seems to be hung
>> not just taking to long. When you have a table with 42,000+ rows it should
>> take more then 8 hours to update no?
>> 

Sinisa> If it returns one row only, then I was wrong, it is not Cartesion
Sinisa> product.

Sinisa> But your query is neither 1 -> N -> N .... join, that is resolved
Sinisa> faster.

Sinisa> As I told you before you do miss some indices.

Sinisa> You can also speed up things by using /* STRAIGHT_JOIN */ where possible.

Adam, could you email us the output of SHOW CREATE TABLE for all your
tables involved in the query together with an EXPLAIN SELECT for the
query in question.  This should help us understand better what is
going on.

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius <monty@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
       <___/   www.mysql.com
Thread
Query Not Using IndexingAdam Douglas31 Jul
  • Re: Query Not Using IndexingSinisa Milivojevic31 Jul
    • Re: Query Not Using IndexingMichael Widenius3 Aug
  • Re: Query Not Using IndexingSinisa Milivojevic31 Jul
RE: Query Not Using IndexingAdam Douglas31 Jul
  • RE: Query Not Using IndexingSinisa Milivojevic1 Aug
RE: Query Not Using IndexingAdam Douglas1 Aug
  • RE: Query Not Using IndexingSinisa Milivojevic2 Aug
    • RE: Query Not Using IndexingMichael Widenius5 Aug
RE: Query Not Using IndexingAdam Douglas2 Aug
  • RE: Query Not Using IndexingSinisa Milivojevic3 Aug
    • RE: Query Not Using IndexingMichael Widenius5 Aug