using limit instead of seeking

Поиск
Список
Период
Сортировка
От admin
Тема using limit instead of seeking
Дата
Msg-id Pine.BSF.4.10.9912091610320.8952-100000@server.b0x.com
обсуждение исходный текст
Ответы indices don't make much difference
Список pgsql-general
Would there be any reasonable performance gain in using LIMIT in an sql
query to print pages of results, instead of seeking to the desired record
and printing a number of records in a while loop?

I have tried both options, but I cannot perceive any significant change in
performance. Is there a way I can actuall test or predict the usefulness
of using one alternative over the other? I am also using SORT in my sql
queries, so perhaps the db server will have to retrieve all records
beforehand anyways in order to perform the sort. In such a case, I guess
using LIMIT wouldn't make much of a difference. On the other hand, there
are perhaps cases when using LIMIT would make a difference.

Any guidance would be appreciated to solving this problem.
Thanks in advance,
Marc



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

Предыдущее
От:
Дата:
Сообщение: Re: [GENERAL] get the previous assigned sequence value
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [GENERAL] Suggested "minor" change to psql