On Sun, Jul 5, 2009 at 7:23 PM, Greg Stark<st...@mit.edu> wrote: >>> >>> Here's a copy of the merge-append patch that I sent months ago merged up to >>> head. I haven't really added any additional functionality since then. >> >> Can you provide some more details about the objective of this patch? Or a >> link to previous discussion? >
i was trying to test this one but i can't find a query that produces a diferent plan than in 8.4.0, attached my current test just in case... what kind of query is this intended to help? something, maybe style dependant, that i don't like is the definition of LAPPEND_PATH_FLATTEN_APPENDPATHS macro at some point in the middle of the file i prefer they be defined at the top (just my preference)... or there is a reason for doing it there? another thing a don't like is those #ifdef FIXME surrounding already existing if, why are those? and if they need to be fixed why there isn't a comment explaining what the fix is or what it should behave? -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157
drop database if exists mergeappend; create database mergeappend; \c mergeappend create table tab1 (col1 int); create table tab1_part1 (check (col1 between 1 and 1000)) inherits (tab1); create table tab1_part2 (check (col1 between 1001 and 2000)) inherits (tab1); create table tab1_part3 (check (col1 between 2001 and 3000)) inherits (tab1); create table tab1_part4 (check (col1 between 3001 and 4000)) inherits (tab1); create table tab1_part5 (check (col1 between 4001 and 5000)) inherits (tab1); create table tab1_part6 (check (col1 between 5001 and 6000)) inherits (tab1); create table tab1_part7 (check (col1 between 6001 and 7000)) inherits (tab1); create table tab1_part8 (check (col1 between 7001 and 8000)) inherits (tab1); create table tab1_part9 (check (col1 between 8001 and 9000)) inherits (tab1); create table tab1_part10 (check (col1 between 9001 and 9999)) inherits (tab1); insert into tab1_part1 select generate_series( 1, 1000); insert into tab1_part2 select generate_series(1001, 2000); insert into tab1_part3 select generate_series(2001, 3000); insert into tab1_part4 select generate_series(3001, 4000); insert into tab1_part5 select generate_series(4001, 5000); insert into tab1_part6 select generate_series(5001, 6000); insert into tab1_part7 select generate_series(6001, 7000); insert into tab1_part8 select generate_series(7001, 8000); insert into tab1_part9 select generate_series(8001, 9000); insert into tab1_part10 select generate_series(9001, 9999); create index idx1_tab1_part1 on tab1_part1(col1); create index idx1_tab1_part2 on tab1_part2(col1); create index idx1_tab1_part3 on tab1_part3(col1); create index idx1_tab1_part4 on tab1_part4(col1); create index idx1_tab1_part5 on tab1_part5(col1); create index idx1_tab1_part6 on tab1_part6(col1); create index idx1_tab1_part7 on tab1_part7(col1); create index idx1_tab1_part8 on tab1_part8(col1); create index idx1_tab1_part9 on tab1_part9(col1); create index idx1_tab1_part10 on tab1_part10(col1); analyze; set enable_sort to off; explain analyze select a.* from tab1 a, tab1 b where a.col1 = b.col1 -- and ((a.col1 >= 997 and a.col1 <= 1000) or -- (a.col1 >= 4999 and a.col1 <= 5000) or -- (a.col1 >= 5995 and a.col1 <= 6000)) order by a.col1
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers