Closed simplerick closed 3 weeks ago
I've encountered the same problem. Have you got any idea about how to fix it?
I checked your configurations and hints without finding any problems. I recommend you use the latest PostgreSQL 16.3 version and pg_hint_plan. 16.3 version could generate the correct plan with the specified join order and join algorithms in your hint.
I have little idea how to act on that. Trying to use the latest version of PostgreSQL with the latest version of pg_hint_plan may help, or not.
If you think that this is a bug, please provide a self-contained test case. You are providing a big query, which is perhaps fine for you, but nobody can really act on that. For now I am closing that, if you can provide more information, please feel free to reopen or create a new ticket with more information. Thanks.
Hi, I am using 1.3.7 version downloaded from releases for PostgreSQL 13.1. I also set the parameters
join_collapse_limit=25; from_collapse_limit=25; geqo_threshold = 25; work_mem = "2000MB";
When I run explain of the following query:
I get the following:
First
chn
is joined, and thenmc
. But it should be in the opposite order. By the way if I remove join method hints and use onlyLeading
the order became exactly what was specified. Am I doing everything right? Thank you!