Re: How do query optimizers affect window functions

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: How do query optimizers affect window functions
Дата
Msg-id CAMkU=1xe8waKiFLv-8VSKYvzCF3oY4WkBvaxY1v1GyY+s_Zg9w@mail.gmail.com
обсуждение исходный текст
Ответ на How do query optimizers affect window functions  (Tianyin Xu <tixu@cs.ucsd.edu>)
Ответы Re: How do query optimizers affect window functions  (Tianyin Xu <tixu@cs.ucsd.edu>)
Список pgsql-general
On Wed, Nov 14, 2012 at 12:12 AM, Tianyin Xu <tixu@cs.ucsd.edu> wrote:
> Hi, Postgresql,
>
> I want to understand how the query optimizers affect the output of the
> window functions.

Use "EXPLAIN".

One is an index scan, one is a bitmap scan.  They return rows in a
different order.

..

> I don't understand why the results are different. Intuitively, the queries
> show return the same results no matter what plan the optimizer choose.

My intuition is that the query should refuse to run at all, because
the results are order dependent and you haven't specified an ordering.

Cheers,

Jeff


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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Using Postgresql 9.2 on windows 7 and windows vista
Следующее
От: "Andrus"
Дата:
Сообщение: Finding first free time from reservations table