Re: [HACKERS] The rewritting of join conditions caused a very slow query plan.

2016-05-18 Thread chang chao
Hi,all This is my ddl and test data. CREATE TABLE level1_table ( level1_no serial NOT NULL , level1_node_name varchar(255), PRIMARY KEY (level1_no) ) WITHOUT OIDS; CREATE TABLE level2_table ( level2_no serial NOT NULL , parent_no int NOT NULL, level1_node_nam

[HACKERS] The rewritting of join conditions caused a very slow query plan.

2016-05-16 Thread chang chao
Hi,all I have a query that is very slow,and the reason may be in the rewritting of join conditions. this is the simplied version table and the key part of the sql. level1_table and level2_table hold the tree data nodes, and all_level_status table holds the current status all all nodes of all le