Re: Performance regression: 9.2+ vs. ScalarArrayOpExpr vs. ORDER BY

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Performance regression: 9.2+ vs. ScalarArrayOpExpr vs. ORDER BY
Дата
Msg-id 87ha2u9u5m.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Performance regression: 9.2+ vs. ScalarArrayOpExpr vs. ORDER BY  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Performance regression: 9.2+ vs. ScalarArrayOpExpr vs. ORDER BY  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 >> I've experimented with the attached patch, which detects when this
 >> situation might have occurred and does another pass to try and
 >> build ordered scans without the SAOP condition. However, the
 >> results may not be quite ideal, because at least in some test
 >> queries (not all) the scan with the SAOP included in the
 >> indexquals is being costed higher than the same scan with the SAOP
 >> moved to a Filter, which seems unreasonable.

 Tom> I'm not convinced that that's a-priori unreasonable, since the
 Tom> SAOP will result in multiple index scans under the hood.
 Tom> Conceivably we ought to try the path with and with SAOPs all the
 Tom> time.

OK, here's a patch that always retries on lower SAOP clauses, assuming
that a SAOP in the first column is always applicable - or is even that
assumption too strong?

--
Andrew (irc:RhodiumToad)


Вложения

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

Предыдущее
От: Rajmohan C
Дата:
Сообщение: Estimating selectivity of predicates involving string pattern matching
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Should extension--unpackaged-$ver.sql's \echo use FROM unpackaged;?