On Fri, May 25, 2007 at 12:09:43PM -0400, Tom Lane wrote:
> This is in the regression database after a completed regression run, so
> it's possible that it's a bit different state from what's seen at the
> instant the cluster test was running, but it sure looks like the
> "expected" results are what you get from a seqscan. Would you force a
> seqscan and see what EXPLAIN shows as the cost on your machine?
I have appended the relevant parts of the modified cluster script.
I haven't pointed out clear enough that I'm running this against a fresh
database cluster, no vacuum, no other databases, no config changes, just initdb,
postmaster startup and installcheck. I usually have [EMAIL PROTECTED] here but I
get the same with locale C.
Feel free to ask for more output.
Oh, btw, its a regular 32bit box as well.
Joachim
QUERY PLAN
---------------------------------------------------------------------------------------------------
Index Scan using pg_constraint_conrelid_index on pg_constraint
(cost=0.00..8.27 rows=1 width=64)
Index Cond: (conrelid = 54538::oid)
(2 rows)
SELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst'::regclass;
conname
----------------
clstr_tst_con
clstr_tst_pkey
(2 rows)
SET enable_indexscan = 0;
EXPLAIN SELECT conname FROM pg_constraint WHERE conrelid =
'clstr_tst'::regclass;
QUERY PLAN
-------------------------------------------------------------------------------------------
Bitmap Heap Scan on pg_constraint (cost=4.26..8.27 rows=1 width=64)
Recheck Cond: (conrelid = 54538::oid)
-> Bitmap Index Scan on pg_constraint_conrelid_index (cost=0.00..4.26
rows=1 width=0)
Index Cond: (conrelid = 54538::oid)
(4 rows)
SELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst'::regclass;
conname
----------------
clstr_tst_pkey
clstr_tst_con
(2 rows)
SET enable_bitmapscan = 0;
EXPLAIN SELECT conname FROM pg_constraint WHERE conrelid =
'clstr_tst'::regclass;
QUERY PLAN
---------------------------------------------------------------
Seq Scan on pg_constraint (cost=0.00..27.15 rows=1 width=64)
Filter: (conrelid = 54538::oid)
(2 rows)
SELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst'::regclass;
conname
----------------
clstr_tst_pkey
clstr_tst_con
(2 rows)
SET enable_indexscan = 1;
SET enable_bitmapscan = 1;
SELECT count(*) FROM pg_constraint;
count
-------
16
(1 row)
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate