From: ZhangJulian <jul...@ou...> - 2014-07-14 01:58:59
|
When the query was running 3 hours, had you monitored the CPU and IO stats? Was it locked or running? Could you run EXPLAIN VERBOSE select..... to see what the remote query looks like? Thanks Julian Date: Fri, 11 Jul 2014 16:58:41 -0430 From: fab...@gm... To: pos...@li... Subject: [Postgres-xc-bugs] Coordinator never ends when executing multiple Join queries Queries with multiple Joins are giving me trouble. My postgres-xc configuration is as follows: 2 datanodes,1 coordinator,1 gtm Each on a different server. I have 5 tables loaded equally on both nodes: 1 replicated and 4 distributed by hash on the correspondent Join attributes. When I run the query on a simple PostgreSQL server, it takes about 20 seconds to finish the execution, but it seems like it will never come to an end whenever I run the query on my postgres-xc server; I have waited over three hours waiting for it to end. Nevertheless, if I do "EXECUTE DIRECT ON node# 'query'", it takes up to 5 seconds tops on both nodes. Suppose my tables are...tableR --- Replicated table table1 --- distributed by hash on (id)table2, table3 & table4 --- distributed by hash on (t1id) ... And:table1 has 2200000 recordstable2 has 2160000 recordstable3 has 2190000 recordstable4 has 6596 recordstableR has 223 records The query is basically something like this: SELECT COUNT(*) FROM table1JOIN table2 ON table2.t1id = table1.id LEFT OUTER JOIN table3 ON table3.t1id = table1.id LEFT OUTER JOIN table4 ON table4.t1id = table1.id LEFT OUTER JOIN tableR ON tableR.id = table4.tRid; Thank you very much,Fabiola Rosato. ------------------------------------------------------------------------------ _______________________________________________ Postgres-xc-bugs mailing list Pos...@li... https://lists.sourceforge.net/lists/listinfo/postgres-xc-bugs |