Re: Join performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
Cc: Pepe Barbe <elventear(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Join performance
Date: 2007-11-09 00:15:05
Message-ID: 25002.1194567305@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Steinar H. Gunderson" <sgunderson(at)bigfoot(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2007-11-09 00:40:20 Re: Estimation problem with a LIKE clause containing a /
Previous Message Tom Lane 2007-11-09 00:15:04 Re: Join performance