Re: [GENERAL] improvements/feedback sought for a working query that looks a bit ugly and might be inefficient

Поиск
Список
Период
Сортировка
От jonathan vanasco
Тема Re: [GENERAL] improvements/feedback sought for a working query that looks a bit ugly and might be inefficient
Дата
Msg-id 28FCE5B6-4A77-4EBE-8989-0E47C670DB79@2xlp.com
обсуждение исходный текст
Ответ на Re: [GENERAL] improvements/feedback sought for a working query thatlooks a bit ugly and might be inefficient  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general

On May 16, 2017, at 10:20 PM, David G. Johnston wrote:

Unless you can discard the 5 and 1000 limits you are going to be stuck computing rank three times in order to compute and filter them.

Thanks a ton for your insight.  I'm suck using them (5 is required for throttling, 1000 is required for this to run in a reasonable amount of time)

The overhead of computing things is indeed super small.  I'm not really worried much about the performance of this query (it runs around 3ms now, down from 20+s).  I'm more worried about this code being referenced and a (possibly improper) idiom being used on queries where it will have a noticeable effect.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round4 - compilation issues on RHEL 7.2
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] Call for users to talk about table partitioning