Re: Order by optimisations?

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Order by optimisations?
Дата
Msg-id 1121285578.5551.0.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Order by optimisations?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Ответы Re: Order by optimisations?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Order by optimisations?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On K, 2005-07-13 at 16:08 +0800, Christopher Kings-Lynne wrote:
> Hi,
> 
> Does PostgreSQL do the following optimisation:
> 
> SELECT * FROM diary WHERE date = '2005-05-01' ORDER BY date;
> 
> or in fact even better (for my situation)
> 
> SELECT * FROM diary WHERE date BETWEEN '2005-05-01' AND '2005-05-01' 
> ORDER BY date;
> 
> Does it know that the input to the sort routine is already sorted and 
> hence is a no-op?

Yes

try EXPLAIN ;)

-- 
Hannu Krosing <hannu@skype.net>



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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: [Bizgres-general] A Guide to Constraint Exclusion
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: win32 _dosmaperr()