Re: UNION ALL on partitioned tables won't use indices. - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: UNION ALL on partitioned tables won't use indices.
Date
Msg-id 20140228.144551.215885523.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: UNION ALL on partitioned tables won't use indices.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Sorry, I did wrong test.

> > > Noah Misch <noah@leadboat.com> writes:
> > > > If the attached patch version looks reasonable, I will commit it.
> > > 
> > > The test case is completely bogus, as the query explained is significantly
> > > different from the query executed.  I'm not sure whether you can just
> > > remove the extra ORDER BY column without getting machine-dependent
> > > results, though.
> > 
> > Each query tests something slightly different.  The EXPLAIN verifies that we
> > can MergeAppend given this query structure, and the plain SELECT verifies that
> > any join tree contortions we made to achieve that do not change the answer.
> 
> I think Tom said that the second query can yield the same result
> even if the 2nd column in orderby is removed so the pertinence of
> it seems doubtful. Actually the altered query gave me the same
> result on my workset (CentOS6.5/x86-64).

No, no! It was actually returned a *different* result. I
accidentially(?) added 'desc' to the '2'. Please forget it.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: UNION ALL on partitioned tables won't use indices.
Next
From: Peter Geoghegan
Date:
Subject: Re: jsonb and nested hstore