Re: Join performance - Mailing list pgsql-performance

From Tom Lane
Subject Re: Join performance
Date
Msg-id 24991.1194567304@sss.pgh.pa.us
Whole thread Raw
In response to Re: Join performance  ("Steinar H. Gunderson" <sgunderson@bigfoot.com>)
List pgsql-performance
"Steinar H. Gunderson" <sgunderson@bigfoot.com> writes:
> 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.

Indeed.  A less brute-force way of getting the planner to favor
indexscans is to reduce random_page_cost ... have you experimented
with that?

Also, consider updating to 8.2.x, which has an improved cost model
for indexscans and will more often make the correct choice without
such shenanigans.

            regards, tom lane

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Join performance
Next
From: Tom Lane
Date:
Subject: Re: Estimation problem with a LIKE clause containing a /