From: Tobias Brox <tobias@nordicbet.com>
To: meetesh.karia@alumni.duke.edu
Cc: pgsql-performance@postgresql.org
Subject: Re: Planner incorrectly choosing seq scan over index scan
Date: Tue, 2 Aug 2005 00:37:08 +0200
Message-ID: <20050801223708.GE17649@tobias.lan> (raw)
In-Reply-To: <fc5b04ca05080115195d15c456@mail.gmail.com>
References: <fc5b04ca05080115195d15c456@mail.gmail.com>
[Meetesh Karia - Tue at 12:19:27AM +0200]
> We're using 8.0.3 and we're seeing a problem where the planner is choosing a
> seq scan and hash join over an index scan. If I set enable_hashjoin to off,
> then I get the plan I'm expecting and the query runs a lot faster. I've also
> tried lowering the random page cost (even to 1) but the planner still
> chooses to use the hash join.
Have you tried increasing the statistics collection?
--
Tobias Brox, +47-91700050
Nordicbet, IT dept
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-performance@postgresql.org
Cc: tobias@nordicbet.com, meetesh.karia@alumni.duke.edu
Subject: Re: Planner incorrectly choosing seq scan over index scan
In-Reply-To: <20050801223708.GE17649@tobias.lan>
* 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