On Tue, Jan 19, 2016 at 1:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> This does indeed sound like a bug, but without a self-contained
> test case, there's not a lot we can do about it.
Yeah, I was flattening this test case before you sent this email,
coming with the attached:
create table aa1 (s1 int, m1 int, m2 int);
create table aa2 (key int, attr int, sort int);
explain select count(1) from (SELECT DISTINCT
aa2.attr, aa2.sort,
aa1.m1, aa1.m2 FROM
aa1, aa2 WHERE
(aa1.s1 = 4527492) AND
(aa1.m2 = aa2.key) ORDER BY
aa1.m1 ASC, aa2.sort ASC,
aa1.m2 ASC) t;
But this is proving to work. There is not much doable here without a
self-contained test case...
--
Michael