| От | Tom Lane |
|---|---|
| Тема | Re: LIMIT clause and long timings |
| Дата | |
| Msg-id | 2249.1143561086@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | LIMIT clause and long timings (Andrea <andrea.b73@email.it>) |
| Ответы |
Re: LIMIT clause and long timings
|
| Список | pgsql-novice |
Andrea <andrea.b73@email.it> writes:
> Then I have tried:
> SELECT * FROM banche ORDER BY banca LIMIT 10 OFFSET 34000;
> [....]
> (10 rows)
> Time: 2433,000 ms
> Why do I get this big timing???
Because the system has to scan through 34000 rows before it gets to the
ten you asked for. OFFSET is not some bit of black magic, it just
causes the executor to discard the first N rows it's computed rather
than sending them over to the client.
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера