From: Ragnar Hafstaư <gnari@simnet.is>
To: Marc McIntyre <mmcintyre@squiz.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow Query
Date: Thu, 14 Jul 2005 11:22:33 +0000
Message-ID: <1121340153.31360.22.camel@localhost.localdomain> (raw)
In-Reply-To: <42D5AC8A.9000003@squiz.net>
References: <42D5AC8A.9000003@squiz.net>
On Thu, 2005-07-14 at 10:06 +1000, Marc McIntyre wrote:
> I'm having a problem with a query that performs a sequential scan on a
> table when it should be performing an index scan. The interesting thing
> is, when we dumped the database on another server, it performed an index
> scan on that server.
...
> The EXPLAIN ANALYZE from the system performing an sequential scan:
>
> QUERY PLAN
> Sort (cost=30079.79..30079.89 rows=42 width=113) (actual time=39889.989..39890.346 rows=260 loops=1)
...
> The EXPLAIN ANALYZE from the system performing an index scan scan:
> Sort (cost=16873.64..16873.74 rows=40 width=113) (actual time=2169.905..2169.912 rows=13 loops=1)
looks like the first query is returning 260 rows,
but the second one 13
this may not be your problem, but are you sure you are using the same
query on the same data here ?
gnari
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gnari@simnet.is, mmcintyre@squiz.net
Subject: Re: Slow Query
In-Reply-To: <1121340153.31360.22.camel@localhost.localdomain>
* 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