From: Scott Marlowe <scott.marlowe@gmail.com>
To: pepone. onrez <pepone.onrez@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: query performance
Date: Sun, 13 Jan 2008 21:39:59 -0600
Message-ID: <dcc563d10801131939t6df7fe66n150fde7562362a61@mail.gmail.com> (raw)
In-Reply-To: <198501d60801131858n529b46dcmeb286cda32d56e93@mail.gmail.com>
References: <198501d60801131858n529b46dcmeb286cda32d56e93@mail.gmail.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: scott.marlowe@gmail.com, pepone.onrez@gmail.com
Subject: Re: query performance
In-Reply-To: <dcc563d10801131939t6df7fe66n150fde7562362a61@mail.gmail.com>
References: <198501d60801131858n529b46dcmeb286cda32d56e93@mail.gmail.com> <dcc563d10801131939t6df7fe66n150fde7562362a61@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox