From: Rod Taylor <rbt@rbt.ca>
To: Scott Cain <cain@cshl.org>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: force the use of a particular index
Date: 11 Jul 2003 10:51:13 +0000
Message-ID: <1057920672.46100.149.camel@jester> (raw)
In-Reply-To: <1057850280.1451.22.camel@localhost.localdomain>
References: <1057850280.1451.22.camel@localhost.localdomain>
On Thu, 2003-07-10 at 15:18, Scott Cain wrote:
> Hello,
>
> I am wondering if there is a way to force the use of a particular index
> when doing a query. I have two tables that are pretty big (each >3
> million rows), and when I do a join between them the performance is
> generally quite poor as it does not use the indexes that I think it
> should use. Here is an example query:
Please send the EXPLAIN ANALYZE results for that query with and without
sequential scans enabled.
set enable_seqscan = true;
EXPLAIN ANALYZE <query>;
set enable_seqscan = false;
EXPLAIN ANALYZE <query>;
Attachments:
signature.asc (application/pgp-signature, 186B) download
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-performance@postgresql.org
Cc: rbt@rbt.ca, cain@cshl.org
Subject: Re: force the use of a particular index
In-Reply-To: <1057920672.46100.149.camel@jester>
References: <1057850280.1451.22.camel@localhost.localdomain> <1057920672.46100.149.camel@jester>
* 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