Re: very slow select with join

2005-01-30 Thread Pavel Novák
Michael Stassen napsal(a): Is this really your query? The LEFT JOINed tables, editor, customer, product, brand, calendar, and partner do not contribute to the output (i.e. none of their columns are selected), nor are they used to determine which rows to consider (i.e. they don't appear in the W

Re: very slow select with join

2005-01-30 Thread Michael Stassen
Pavel Novak wrote: Hello, I am clueless of this query, becaouse it's very slow - between 30 and 60 seconds: mysql> SELECT DISTINCT o.id AS id, o.orderid AS orderid, o.serialid AS serialid -> FROM orders o -> LEFT JOIN editor e1 ON o.createdby = e1.id -> LEFT JOIN editor e2 ON o.changed

Re: very slow select with join

2005-01-30 Thread Michael Stassen
Pavel Novák wrote: yea, but I use a lot of indexes and I don't know how to set it better. Bellow there are create table info so could you tell me what do you think would be bad, please? To begin with, you have redundant indexes. Unnecessary indexes slow you down. CREATE TABLE `order_acl` ( `ob

Re: very slow select with join

2005-01-30 Thread Pavel Novák
Jigal van Hemert napsal(a): | 1 | SIMPLE | o | ALL| NULL | NULL| NULL | NULL| 20402 | Using temporary; Using filesort | Well, this is a clue IMHO... no suitable indexes in o could be found to use in this query... yea, but I use a lot of indexes a

Re: very slow select with join

2005-01-28 Thread Jigal van Hemert
From: "Pavel Novak" > | 1 | SIMPLE | o | ALL| NULL | NULL|NULL > | NULL| 20402 | Using temporary; Using filesort | Well, this is a clue IMHO... no suitable indexes in o could be found to use in this query... Since you use a lot of columns fro