Re: Controlling complexity in queries

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Controlling complexity in queries
Дата
Msg-id 4EE5709D.4020108@ringerc.id.au
обсуждение исходный текст
Ответ на Re: Controlling complexity in queries  (David Johnston <polobo@yahoo.com>)
Ответы Re: Controlling complexity in queries
Список pgsql-general
On 12/12/2011 09:15 AM, David Johnston wrote:
> Use a WITH clause on the SELECT statement.
Note that WITH is an optimisation fence, so if you're relying on Pg
pushing WHERE clauses down into subqueries or anything like that you may
find that your query runs a LOT slower when broken up as WITH expressions.

There's been talk of a Pg extension that allows optimisation through
WITH, but it's not currently possible.

Another option is to wrap things up in SQL functions or views.

--
Craig Ringer

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Howto to clear PostgreSQL cache and how to preload all tuples of a table into the cache?
Следующее
От: devrim@gunduz.org
Дата:
Сообщение: Re: Problem installing PG9.1 using yum