Re: Experimental evaluation of PostgreSQL's query optimizer

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Experimental evaluation of PostgreSQL's query optimizer
Дата
Msg-id CAMsr+YGCC-RzmLhjbMfQ5tVdA75wWvtj0HthPkFrz9J8tAawtQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Experimental evaluation of PostgreSQL's query optimizer  (Viktor Leis <leis@in.tum.de>)
Ответы Re: Experimental evaluation of PostgreSQL's query optimizer  (Viktor Leis <leis@in.tum.de>)
Список pgsql-hackers
On 21 December 2015 at 23:57, Viktor Leis <leis@in.tum.de> wrote:
 

Please have a look at Figure 6 (page 6) in
http://www.vldb.org/pvldb/vol9/p204-leis.pdf Disabling nested loop
joins without index scan (going from (a) to (b)) results in great
improvements across the board. And even more importantly, it avoids
most of the cases where queries took unreasonably long and timed
out. Basically this amounts to the being able to run the query on
PostgreSQL or not.

For that data, yes. But you're ignoring other important cases. Small or even 1-element lookup tables can be one where a nestloop over a seqscan turns out to be by far the fastest way to do the job. This can really add up if it's deep in a subplan that's excuted repeatedly, or if it's part of queries that get run very frequently on a busy OLTP system.

That said, these cases are also the ones that land up hurting very badly if the stats are inaccurate or outdated and our expected 3 loops turns into 3000.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Combining Aggregates
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Experimental evaluation of PostgreSQL's query optimizer