How can I see execution time of an ALTER TABLE statement? Is it possible to see the execution time of an alter table command?
I think with \timing on in psql, it shows more than the execution time, but also the client round trip, and maybe other things as well. What I want is the &quot;execution time&quot; shown by explain analyze. But I can't run alter table through explain analyze (right?).
Turn on \timing, run your ALTER TABLE and SELECT 1.
Subtract the values for a good estimate.