postgres sql 解释删除语句
问题。在 postgres EXPLAIN DELETE FROM ...
的返回中:
Delete (cost=0.00..19474.19 rows=266518 width=6)
花费 19474 是否意味着以秒为单位的执行时间?就像 19474s = 5.4 小时?
谢谢!
Question. In this return from postgres EXPLAIN DELETE FROM ...
:
Delete (cost=0.00..19474.19 rows=266518 width=6)
Does cost 19474 mean execution time in seconds? Like in 19474s = 5.4 hours?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,成本以任意单位衡量。如果您使用 EXPLAIN ANALYZE 而不是 EXPLAIN,postgres 将实际执行请求,然后告诉您以秒为单位的时间(尝试使用类似
EXPLAIN ANALYZE SELECT * FROM ....
的内容。您可以阅读更多内容关于解释和分析此处No, the cost is measured in arbitrary units. If you use EXPLAIN ANALYZE instead of EXPLAIN postgres will actually perform the request, and then tell you the time in seconds (try it with something like
EXPLAIN ANALYZE SELECT * FROM ....
. You can read more about explain and analyze here