Re: stange optimizer results
От | Stephan Szabo |
---|---|
Тема | Re: stange optimizer results |
Дата | |
Msg-id | 20021121101430.J96861-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | stange optimizer results ("Peter T. Brown" <peter@memeticsystems.com>) |
Ответы |
Re: stange optimizer results
|
Список | pgsql-performance |
On 21 Nov 2002, Peter T. Brown wrote: > Hello-- > > Attached is a file containing two SQL queries. The first take > prohibitively long to complete because, according to EXPLAIN, it ignore > two very important indexes. The second SQL query seems almost identical > to the first but runs very fast because, according to EXPLAIN, it does > uses all the indexes appropriately. > > Can someone please explain to me what the difference is here? Or if > there is something I can do with my indexes to make the first query run > like the second? It doesn't take into account that in general a=b, b=constant implies a=constant. Perhaps if you used explicit join syntax for visitor joining visitorextra it might help. Like doing: FROM visitor inner join visitorextra on (...) left outer join ...
В списке pgsql-performance по дате отправления: