Re: Partition elimination problem
От | Milen Kulev |
---|---|
Тема | Re: Partition elimination problem |
Дата | |
Msg-id | 000001c6dae8$cc658170$0a00a8c0@trivadis.com обсуждение исходный текст |
Ответ на | Re: Partition elimination problem (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-performance |
Hi Tom,
You are right, of course :
pgpool=# set constraint_exclusion = on ;
SET
pgpool=# explain analyze select * from part where id1=3 and id2=5 ;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------------------------
Result (cost=0.00..289.92 rows=3 width=130) (actual time=3.604..27.839 rows=483 loops=1)
-> Append (cost=0.00..289.92 rows=3 width=130) (actual time=3.600..22.550 rows=483 loops=1)
-> Seq Scan on part (cost=0.00..24.85 rows=1 width=130) (actual time=0.001..0.001 rows=0 loops=1)
Filter: ((id1 = 3) AND (id2 = 5))
-> Bitmap Heap Scan on part_id1_0_10 part (cost=1.02..9.50 rows=1 width=130) (actual time=0.014..0.014 rows=0 loops=1)
Recheck Cond: (id1 = 3)
Filter: (id2 = 5)
-> Bitmap Index Scan on idx_part_id1_0_10 (cost=0.00..1.02 rows=5 width=0) (actual time=0.009..0.009 rows=0 loops=1)
Index Cond: (id1 = 3)
-> Bitmap Heap Scan on part_id1_0_10__id2_0_10 part (cost=2.52..255.56 rows=1 width=130) (actual time=3.578..20.377 rows=483 loops=1)
Recheck Cond: (id2 = 5)
Filter: (id1 = 3)
-> Bitmap Index Scan on idx_part_id1_0_10__id2_0_10 (cost=0.00..2.52 rows=148 width=0) (actual time=3.460..3.460 rows=5242 loops=1)
Index Cond: (id2 = 5)
Total runtime: 30.576 ms
constraint_exclusion
----------------------
off
(1 row)
SET
pgpool=# show constraint_exclusion ;
constraint_exclusion
----------------------
on
(1 row)
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, September 18, 2006 1:14 AM
To: Milen Kulev
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Partition elimination problem
"Milen Kulev" <makulev@gmx.net> writes:
> My Problem is that I don't see partiotion elimination feature
> (Parameer = constraint_exclusion is ON):
Your example works as expected for me. You *sure* you have constraint_exclusion turned on?
regards, tom lane
В списке pgsql-performance по дате отправления: