How does filter order relate to query optimization?

Поиск
Список
Период
Сортировка
От Andrew Edson
Тема How does filter order relate to query optimization?
Дата
Msg-id 347942.53848.qm@web34201.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: How does filter order relate to query optimization?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I'm working on a php project that's supposed to draw information from the DB for display, and I've been requested to speed up the display as much as possible.  I'm drawing data from four tables, with an additional two that I have to 'bounce' through to match the keys together.  Also, I've got five direct filtering requirements, four of the 'value = X' type and a date range.
 
My question is this: Would shuffling the placement of the filtering requirements (t1.some_key = t2.some_key and t1.some_other_value = X, etc.) make a difference in processing speed for the response time?  And if so, would the response be quicker with the direct (value = x) filters at the front of the WHERE clause, or the end?


Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel
to find your fit.

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

Предыдущее
От: Bill Moran
Дата:
Сообщение: Unable to restore dump due to client encoding issues -- or, when is SQL_ASCII really UTF8
Следующее
От: George Nychis
Дата:
Сообщение: performance of partitioning?