From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "pepone(dot) onrez" <pepone(dot)onrez(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: query performance |
Date: | 2008-01-14 03:39:59 |
Message-ID: | dcc563d10801131939t6df7fe66n150fde7562362a61@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Jan 13, 2008 8:58 PM, pepone. onrez <pepone(dot)onrez(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-01-14 03:52:25 | Re: query performance |
Previous Message | Alex Turner | 2008-01-14 03:30:46 | Re: query performance |