Strange query planner behavior

From: Qi Huang <huangqiyx(at)hotmail(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Strange query planner behavior
Date: 2012-05-22 05:02:38
Message-ID: BAY159-W50C8236FEDEEB74C315EC5A3020@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi, hackers (I'm doing another project related to Postgres besides the gSOC, so this one is not for TABLESAMPLE) I have a query as follows :select *from affiliation a, author_aff_history his, author auwhere a.aff_name = his.aff_nameand his.person_id = au.person_id;
I trace the RelOptInfo *rel in make_one_rel. In the pathlist, however, I find there are two duplicate paths(the latter two, both start with NESTPATH, and NEST on (b 2) and (b1) first, then with (b 3)). And there is another path that I think should be the optimal join tree(left-deep and no cartesian product), but I can't find it in the pathlist. The rel structure is attached in this email, the duplicate are in line 644 and 1321 respectively. I'm not sure whether I should ask this in the hacker list or other list, but just try here first.Why is that so? Any suggestion?

Best Regards and ThanksHuang Qi VictorComputer Science of National University of Singapore

Attachment Content-Type Size
pathlist application/octet-stream 102.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-05-22 05:44:13 Re: Strange query planner behavior
Previous Message Tom Lane 2012-05-22 03:44:02 Re: psql bug