Re: SQL Query Optimization

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL Query Optimization
Дата
Msg-id 11799.1019140689@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SQL Query Optimization  (Dav Coleman <dav@serve.com>)
Список pgsql-hackers
Dav Coleman <dav@serve.com> writes:
> I have noticed that the semantically equivalent SQL queries can
> differ
> vastly in speed performance depending on the order of clauses ANDed
> together ( "WHERE cond1 AND cond2" takes forever, but  "WHERE cond2
> AND cond1" comes right back).

Could we see a specific example?

It would also be useful to know what PG version you are using, whether
you've VACUUM ANALYZEd the tables, and what EXPLAIN has to say about
your query.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Loftis
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Следующее
От: Michael Loftis
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE