Postgresql提供参数join_collapse_limit = 1来禁用连接顺序。但是当我设置参数并重置服务器时,查询计划不会更改,并且仍然存在订单连接优化。我的查询FROM表就像这样
FROM
student as group_A,
student as group_B,
student as group_C
WHERE ...
答案 0 :(得分:0)
如果用户想要使用join_collapse_limit = 1来禁用连接重新排序,则必须在查询中提供显式JOINS。例如,上面的FROM表应该是
FROM
student as group_A CROSS JOIN
student as group_B CROSS JOIN
student as group_C
WHERE ...