where x and y and z
where y and z and x
有没有在性能方面的差异,以及如何做PostgreSQL的过滤器?
我在哪里可以找到这方面的文档?
where x and y and z
where y and z and x
有没有在性能方面的差异,以及如何做PostgreSQL的过滤器?
我在哪里可以找到这方面的文档?
只需在EXPLAIN
之前预先填写您的查询,您就会看到有关规划师真正计划的好信息。
http://www.postgresql.org/docs/9.2/static/sql-explain.html
SQL不是过程语言。 订单其中WHERE
条件出现是完全不相关。 PostgreSQL将评估每一行的整个表达式,但根据查询计划决定何时以及何时应用每个表达式。
只要确保按照operator precedence获得了逻辑直线。
[SQL question:WHERE子句的顺序是否有所作用?](http://stackoverflow.com/questions/1458060/sql-question-does-the-order-of-the-where -clause-make-a-difference) –
但我在问postgresql planner如何处理这个问题? – ali