Re: Join performance - Mailing list pgsql-performance

From Steinar H. Gunderson
Subject Re: Join performance
Date
Msg-id 20071108225120.GA22963@uio.no
Whole thread Raw
In response to Join performance  (Pepe Barbe <elventear@gmail.com>)
Responses Re: Join performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Join performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Join performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Join performance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Thu, Nov 08, 2007 at 04:47:09PM -0600, Pepe Barbe wrote:
> I am having an issue on PostgreSQL 8.0.12. In the past we had performance
> issues with the query planner for queries on some tables where we knew we
> had indexes and it was doing a sequential scan, and for this reason we
> issue "SET enable_seqscan = FALSE" for some queries.

This is a bad idea in general. Did you really measure that this made queries
run faster? Generally, using an index is not always a win, and the planner
tries to figure out when it isn't. Setting it globally is seldom a good idea
anyway; if it really _is_ a win for a given query, you could always set it
locally in that session.

> Any ideas what could I try to fix this problem?

Re-enable seqscan?

/* Steinar */
--
Homepage: http://www.sesse.net/

pgsql-performance by date:

Previous
From: Pepe Barbe
Date:
Subject: Join performance
Next
From: Gregory Stark
Date:
Subject: Re: Estimation problem with a LIKE clause containing a /