Re: [HACKERS] Solution for LIMIT cost estimation

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: [HACKERS] Solution for LIMIT cost estimation
Дата
Msg-id 3.0.1.32.20000213152912.010daa30@mail.pacifier.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Solution for LIMIT cost estimation  (Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>)
Список pgsql-hackers
At 10:11 AM 2/14/00 +1100, Chris Bitmead wrote:

>> Of the standard aggregates, "count()" is probably the only one that
>> could make use of it.  And of course only rarely is count() used
>> in such a way.
>
>I think a lot of the agregates could make use of it. For example, tell
>me all the departments who have spent more than $1000,000 this year...
>
>select deptid, sum(amount) > 1000000 from purchases group by deptid;

This would be harder, because you could only guarantee that sum is
of all positive or negative numbers if the user provides a constraint.

>> As someone who has long made his living implementing optimizing
>> compilers, I don't think that optimizing expressions such as the
>> one Chris mentions is all that difficult a task.
>> 
>> But there are far more important things to think about implementing
>> in Postgres.
>
>Yep.

Good, because I was about to repeat myself :)



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


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

Предыдущее
От: Chris Bitmead
Дата:
Сообщение: Re: [HACKERS] Solution for LIMIT cost estimation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Solution for LIMIT cost estimation