Re: query performance

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: query performance
Дата
Msg-id dcc563d10801131939t6df7fe66n150fde7562362a61@mail.gmail.com
обсуждение исходный текст
Ответ на query performance  (pepone.onrez <pepone.onrez@gmail.com>)
Ответы Re: query performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Jan 13, 2008 8:58 PM, pepone. onrez <pepone.onrez@gmail.com> wrote:
> I have this query in a table with 150 thowsand tuples and it takes to long
>
>     t_documentcontent._id AS _id
>     FROM t_documentcontent LIMIT 50 OFFSET 80000
>
> here is the explain output
>
> "Limit  (cost= 100058762.30..100058799.02 rows=50 width=58) (actual
> time=19433.474..19433.680 rows=50 loops=1)"
> "  ->  Seq Scan on t_documentcontent  (cost=100000000.00..100110772.07
> rows=150807 width=58) (actual time=53.934..19402.030 rows=80050 loops=1)"
> "Total runtime: 19433.748 ms"

looks like you've set enable_seqscan=off.  When looking for help on
queries it's a good idea to mention such things...

with no order by, and possibly no index on t_documentcontent._id,
there's no choice but a seq scan.

try adding both.

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

Предыдущее
От: "Alex Turner"
Дата:
Сообщение: Re: query performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: query performance