| От | Tom Lane |
|---|---|
| Тема | Re: ORDER BY ... LIMIT.. performance |
| Дата | |
| Msg-id | 2707.1039125609@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | ORDER BY ... LIMIT.. performance ("john cartmell" <john.cartmell@mediaburst.co.uk>) |
| Список | pgsql-performance |
"john cartmell" <john.cartmell@mediaburst.co.uk> writes:
> Without the LIMIT clause the query takes approximately 3-5 seconds to
> return.
> If total number of rows returned without the LIMIT clause is greater
> than 20 records, then the above query also takes th same amount of time.
> But if the the total number of rows is 20 or less then the time taken
> for the above query to return goes up to 20-30 seconds.
What does EXPLAIN (or better EXPLAIN ANALYZE) show for these various
cases? Evidently the planner is shifting to a different plan because
of the small LIMIT, but with no details it's hard to say anything
useful.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера