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!
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