From: | Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com> |
---|---|
To: | Eric Schwarzenbach <Eric(dot)J(dot)Schwarzenbach(dot)C88(at)alumni(dot)upenn(dot)edu> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: explicit JOIN faster than implicit? |
Date: | 2009-08-05 23:17:08 |
Message-ID: | 92869e660908051617n4bc46829mec5cee9a9814269d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
2009/8/6 Eric Schwarzenbach <Eric(dot)J(dot)Schwarzenbach(dot)C88(at)alumni(dot)upenn(dot)edu>
> I tried playing with the join_collapse_limit setting. The implicit join
> query was unaffected. The explicit join out-performed the implicit one
> by 50% when the join_collapse_limit was low enough, and took just as
> long as the implicit one when the join_collapse_limit was high enough.
>
> If I'm reading the documentation right, when the join_collapse_limit is
> high enough, the planner is rewriting my explicit join syntax into the
> implicit join syntax...with the effect of slowing it down!
>
> I'm not especially concerned, as the performance is acceptable either
> way, and I'll be getting the better performance anyway, but I'm just
> wondering if this behavior is expected.
>
Probably it's not expected, and definitely it is not desired :)
It would be helpful if you post explain analyze of both queries, before and
after VACUM ANALYZE of all used tables.
You can also try to increase statistics target for join columns. Indexes
might help too.
--
Filip Rembiałkowski
JID,mailto:filip(dot)rembialkowski(at)gmail(dot)com
http://filip.rembialkowski.net/
From | Date | Subject | |
---|---|---|---|
Next Message | Ivan Voras | 2009-08-05 23:39:13 | Re: PREPARE query with IN? |
Previous Message | Tom Lane | 2009-08-05 23:10:37 | Re: explicit JOIN faster than implicit? |