using limit instead of seeking

Поиск
Список
Период
Сортировка
Искать
От
admin
Тема
using limit instead of seeking
Дата
Msg-id
Pine.BSF.4.10.9912091610320.8952-100000@server.b0x.com
Список
Дерево обсуждения
using limit instead of seeking admin <admin@wtbwts.com>
indices don't make much difference admin <admin@wtbwts.com>
Re: [GENERAL] indices don't make much difference Howie <caffeine@toodarkpark.org>
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 по дате отправления
От:
Дата:
От: Peter Eisentraut
Дата:
FAQ