Re: performance on selecting a row in large tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: performance on selecting a row in large tables
Дата
Msg-id 7905.1202157565@sss.pgh.pa.us
обсуждение исходный текст
Ответ на performance on selecting a row in large tables  ("Rainer Spittel" <rainer.spittel@terralink.co.nz>)
Список pgsql-admin
"Rainer Spittel" <rainer.spittel@terralink.co.nz> writes:
> When performing a 'select col01_id from table limit 1 offset 100000;',
> the query takes up to 20sec. Monitoring the dstats on the server, I see
> that the box is reading approx. 1GB from the disks.

No surprise.  That query says "read 100001 rows, then throw away the
first 100000".

Why are you considering that this is an important performance measure?
Are you aware that the results of such a query aren't even very well
defined (since you omitted an ORDER BY)?

            regards, tom lane

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

Предыдущее
От: "Rainer Spittel"
Дата:
Сообщение: performance on selecting a row in large tables
Следующее
От: Tino Schwarze
Дата:
Сообщение: Re: performance on selecting a row in large tables