From: Ashutosh B. <ash...@en...> - 2013-03-22 04:57:16
|
Hi Arni, By any chance, you have children inheriting from table1 and table2? Can you please send \d+ output on these tables? On Fri, Mar 22, 2013 at 8:49 AM, Arni Sumarlidason < Arn...@md...> wrote: > Hello Mr. Bapat,**** > > ** ** > > I modified the output a little, but only the fields selected,**** > > > QUERY > PLAN > > **** > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **** > > Hash Join (cost=1.64..5.35 rows=236 width=10726)**** > > Output: t.id, t.seq, t.text, t.date_updated**** > > Hash Cond: (t.id = l.id)**** > > -> Append (cost=0.00..0.00 rows=36000 width=5638)**** > > -> Data Node Scan on table "_REMOTE_TABLE_QUERY_" > (cost=0.00..0.00 rows=1000 width=5638)**** > > Output: t.id, t.seq, t.text, t.date_updated**** > > Node/s: datanode01d, datanode02d, datanode03d, datanode04d, > datanode05d, datanode06d, datanode07d, datanode08d, datanode09d, > datanode10d, datanode11d, datanode12d, datanode13d, datanode14d, > datanode15d, datanode16d, datanode17d, datanode18d, datanode19d, datanode20d > **** > > Remote query: SELECT id, seq, text, date_updated FROM ONLY > table t WHERE true**** > > ** ** > > + 10-20 similar**** > > **** > > -> Hash (cost=0.00..0.00 rows=131000 width=5088)**** > > Output: l.id, l.date_updated, l.seq, l.text**** > > -> Append (cost=0.00..0.00 rows=131000 width=5088)**** > > -> Data Node Scan on table_2 "_REMOTE_TABLE_QUERY_" > (cost=0.00..0.00 rows=1000 width=5088)**** > > Output: l.id, l.date_updated, l.seq, l.text**** > > Node/s: datanode01d, datanode02d, datanode03d, > datanode04d, datanode05d, datanode06d, datanode07d, datanode08d, > datanode09d, datanode10d, datanode11d, datanode12d, datanode13d, > datanode14d, datanode15d, datanode16d, datanode17d, datanode18d, > datanode19d, datanode20d**** > > Remote query: SELECT id, date_updated, seq, text FROM > ONLY table_2 l WHERE ((date_updated >= '2012-12-15 00:00:00-05'::timestamp > with time zone) AND (date_updated < '2013-01-01 00:00:00-05'::timestamp > with time zone))**** > > ** ** > > + 30-50 Similar**** > > ** ** > > Thank you for your time,**** > > ** ** > > *From:* Ashutosh Bapat [mailto:ash...@en...] > *Sent:* Friday, March 22, 2013 12:28 AM > *To:* Arni Sumarlidason > *Cc:* Koichi Suzuki; pos...@li... > *Subject:* Re: [Postgres-xc-general] Planner join logic**** > > ** ** > > Hi Arni, > Can you please send an explain verbose output of this query?**** > > On Thu, Mar 21, 2013 at 5:57 PM, Arni Sumarlidason < > Arn...@md...> wrote:**** > > As always, thank you for your responses, appreciate it! **** > > **** > > We are using trunk from around Feb. 18th.**** > > **** > > Here are some tables that replicate the issue,**** > > create table table1(**** > > id bigint,**** > > seq integer,**** > > text data(256),**** > > created_at timestamp with time zone,**** > > PRIMARY KEY(id, seq)) DISTRIBUTE BY HASH(id);**** > > **** > > create table table2(**** > > id bigint,**** > > seq integer,**** > > text data_complex(256),**** > > update_time timestamp with time zone,**** > > PRIMARY KEY(id, seq)) DISTRIBUTE BY HASH(id);**** > > **** > > Select * from table1 t1, table2 t2 where t2.update_time >= ‘2012-12-15’ > and t2.update_time < ‘2013-01-01’ and t2.id<https://console.mxlogic.com/redir/?2eosod7bNEVd79JYsOMOyqejhOr01PjWi1K_cKnLuZXTKrKrSxdKtq4-8qJIMlY9_5qcGuwgVsSYYyCrhpspd7arz3XxJxwS2_id41Fr2Rqj8N-xsfIn8_3UWuqnjh05zZx3UCy0hHa1EwfGhBoTfM-u0USyrjdIIczxNEVvsdVuuN3I-tei91> > =t1.id<https://console.mxlogic.com/redir/?zC763hOYqejhOrv7cIcECzAQsCM0sQuAwrLPbBXTLuZXCXCZEjrDmxfy6Hrc5v2vNmzaDE4endLf8FCQmn6jhOCUM-UroodwLQzh0qmMJmAOcvEn3X5OfM-eDCBQQg1o_og-9Ew4qOwq83WApmdPYfDwedFCQPrb38UsqenT3qiXMGWXj> > **** > > **** > > Thank you,**** > > Arni**** > > > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Enterprise Postgres Company**** > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |