| От | Tom Lane |
|---|---|
| Тема | Re: Query only slow on first run |
| Дата | |
| Msg-id | 13658.1196350343@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Query only slow on first run (cluster <skrald@amossen.dk>) |
| Список | pgsql-performance |
cluster <skrald@amossen.dk> writes:
>> You're essentially asking for a random sample of data that is not
>> currently in memory. You're not going to get that without some I/O.
> No, that sounds reasonable enough. But do you agree with the statement
> that my query will just get slower and slower over time as the number of
> posts increases while the part having status = 1 is constant?
No, not as long as it sticks to that plan. The time's basically
determined by the number of aggregate rows the LIMIT asks for,
times the average number of "post" rows per aggregate group.
And as far as you said the latter number is not going to increase.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера