Re: Can I force a query plan to materialise part?

Поиск
Список
Период
Сортировка
От Ondrej Ivanič
Тема Re: Can I force a query plan to materialise part?
Дата
Msg-id CAM6mieKhRdqYBbBWtsPyEpoyB3WT+uurw-Q9v1xXSEmuwKpUVA@mail.gmail.com
обсуждение исходный текст
Ответ на Can I force a query plan to materialise part?  (Toby Corkindale <toby.corkindale@strategicdata.com.au>)
Ответы Re: Can I force a query plan to materialise part?  (Toby Corkindale <toby.corkindale@strategicdata.com.au>)
Список pgsql-general
Hi,

On 2 October 2012 12:33, Toby Corkindale
<toby.corkindale@strategicdata.com.au> wrote:
> I have a query that joins two views, and takes 28 seconds to run.
> However if I create temporary tables that contain the contents of each view,
> and then join them, the total time is 1.3 seconds.

try "offset 0" (or you can tweak statistics collector to get better estimates):
select ... from (select * from view offset 0) as v ....

http://blog.endpoint.com/2009/04/offset-0-ftw.html

--
Ondrej Ivanic
(ondrej.ivanic@gmail.com)


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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Can I force a query plan to materialise part?
Следующее
От: Toby Corkindale
Дата:
Сообщение: Re: Can I force a query plan to materialise part?