From: Dan Langille <dan@langille.org>
To: pgsql-performance@postgresql.org
Subject: seq scan woes
Date: Mon, 07 Jun 2004 15:45:42 -0400
Message-ID: <40C48DA6.3356.48DAC2EB@localhost> (raw)
A production system has had a query recently degrade in performance.
What once took < 1s now takes over 1s. I have tracked down the
problem to a working example.
Compare http://rafb.net/paste/results/itZIx891.html
with http://rafb.net/paste/results/fbUTNF95.html
The first shows the query as is, without much change (actually, this
query is nested within a larger query, but it demonstrates the
problem). The query time is about 1 second.
In the second URL, a "SET ENABLE_SEQSCAN TO OFF;" is done, and the
time drops to 151ms, which is acceptable.
What I don't understand is why the ports table is scanned in the
first place. Clues please?
--
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/
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: dan@langille.org
Subject: Re: seq scan woes
In-Reply-To: <40C48DA6.3356.48DAC2EB@localhost>
* 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