From: H Hale <hhale21@rogers.com>
To: pgsql-performance@postgresql.org
Subject: Re: sub select performance due to seq scans
Date: Mon, 31 Jul 2006 12:09:02 -0400 (EDT)
Message-ID: <20060731160902.37302.qmail@web88007.mail.re2.yahoo.com> (raw)
In-Reply-To: <14463.1154356126@sss.pgh.pa.us>
Tom,
It is unique.
Indexes:
"flatomfilesysentry_pkey" PRIMARY KEY, btree (objectid)
"capsa_flatomfilesysentry_name_idx" btree (name)
Foreign-key constraints:
"objectid" FOREIGN KEY (objectid) REFERENCES capsa_sys.master(objectid) ON DELETE CASCADE
Tom Lane <tgl@sss.pgh.pa.us> wrote: H Hale writes:
> -> Bitmap Heap Scan on flatomfilesysentry (cost=2.00..274.38 rows=3238 width=30) (actual time=0.011..0.013 rows=1 loops=6473)
> Recheck Cond: (flatomfilesysentry.objectid = "outer".dstobj)
> -> Bitmap Index Scan on flatomfilesysentry_pkey (cost=0.00..2.00 rows=3238 width=0) (actual time=0.007..0.007 rows=1 loops=6473)
> Index Cond: (flatomfilesysentry.objectid = "outer".dstobj)
Well, there's our estimation failure: 3238 rows expected, one row
actual.
What is the data distribution of flatomfilesysentry.objectid?
It looks from this example like it is unique or nearly so,
but the planner evidently does not think that.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
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: hhale21@rogers.com
Subject: Re: sub select performance due to seq scans
In-Reply-To: <20060731160902.37302.qmail@web88007.mail.re2.yahoo.com>
* 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