【发布时间】:2012-02-02 14:10:50
【问题描述】:
是否可以在 Doctrine 中使用 EXPLAIN sql 命令?如果没有,如何使用 Doctrine 测试/优化 sql 代码?
【问题讨论】:
是否可以在 Doctrine 中使用 EXPLAIN sql 命令?如果没有,如何使用 Doctrine 测试/优化 sql 代码?
【问题讨论】:
您没有说您使用的是哪个版本,所以我无法具体回答,但这里有一些链接:
Doctrine - How to print out the real sql, not just the prepared statement?
Doctrine - how to get the SQL INSERT query, in the postSave() event?
How to debug MySQL/Doctrine2 Queries?
http://www.chrisshennan.com/2009/12/07/raw-sql-from-doctrine-query-object-revised/#.T7ARLOs6E0E
(您的答案在上述链接之一,如果没有,请发表评论)
【讨论】: