postgres sql 解释删除语句

发布于 2024-12-11 17:34:25 字数 204 浏览 5 评论 0原文

问题。在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

卸妝后依然美 2024-12-18 17:34:25

不,成本以任意单位衡量。如果您使用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文