Re: force the use of a particular index

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Scott Cain <cain(at)cshl(dot)org>
Cc: Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: force the use of a particular index
Date: 2003-07-11 10:51:13
Message-ID: 1057920672.46100.149.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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>;

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Rod Taylor 2003-07-11 10:55:59 Re: Dual Xeon + HW RAID question
Previous Message Shridhar Daithankar 2003-07-11 10:32:43 Postgresql General Bits issue