From: Josh Berkus <josh@agliodbs.com>
To: Michael Nachbaur <mike@nachbaur.com>
To: Greg Stark <gsstark@mit.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: Forcing query to use an index
Date: Mon, 3 Mar 2003 15:21:48 -0800
Message-ID: <200303031521.48013.josh@agliodbs.com> (raw)
In-Reply-To: <06B62341-4DCA-11D7-90E0-000A27935D5A@nachbaur.com>
References: <06B62341-4DCA-11D7-90E0-000A27935D5A@nachbaur.com>
Micheal,
Don't forget to run ANALYZE as well; this does not require a table lock.
> Does using "set enable_seqscan = off" impact anything else on the
> system, or is it connection-specific? Is this the recommended way of
> doing this, or is there another way of coercing Postgres into using
> indexes? I'm making these queries from Perl code running in an XSP
> page, so I'm not sure how flexible this option would be from a
> developer point of view.
Setting enable_seqscan=off is just for testing purposes, to see if the planner
is making a wrong decision so that you can adjust your .conf params, query,
and/or indexes to suit. The setting is *not* intended as a production
solution.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
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-sql@postgresql.org
Cc: josh@agliodbs.com, mike@nachbaur.com, gsstark@mit.edu
Subject: Re: Forcing query to use an index
In-Reply-To: <200303031521.48013.josh@agliodbs.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