如何查看“实际执行计划”我们在 python 中的查询?
我在 python 中有一个 sql 查询,它非常慢,它包含一些内部联接,
有人建议在这种情况下我们可以:打开“显示实际执行计划”选项,然后仔细看看是什么导致了减速。
这里有人有和我类似的问题: Slow SQL Query due to内连接和左连接?
有谁知道如何在 python 脚本内的 sqlite 中查看“实际执行计划”和“估计执行计划”?
我在这里找到了一些辩护: http://www.simple-talk.com/sql/performance /执行计划-基础/ 但还是不知道如何用Python实现,有推荐吗?
欢呼
阿蒂耶
I have a sql query in python which is pretty slow, it contain some inner join,
And some one suggest that in this case we can: turn on the "Show Actual Execution Plan" option and then take a close look at what is causing the slowdown.
Here some one has similar prolem as me : Slow SQL Query due to inner and left join?
Does anyone know how can I see the "Actual Execution Plan" and "estimated Execution Plan" in sqlite inside a python script?
I found some defenitions here :
http://www.simple-talk.com/sql/performance/execution-plan-basics/
But still don't know how to do it in python, Any recommendation?
cheers
Atieh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以像发出任何其他查询一样发出 EXPLAIN 查询。
You issue the EXPLAIN query the same as you would any other query.