Ole Tange <postgresql.org@tange.dk> writes:
> As I read it the output tells me what was done during the milliseconds:
No, you have a fundamental misconception here. The notation means that
the first output row from a plan step was delivered after X
milliseconds, and the last row after Y milliseconds.
The "gap" you are looking at is the time to do the Sort (since a sort
can't deliver the first output row until it's finished the sort).
It is gonna take a while to sort 175000 rows ... but possibly increasing
sort_mem would help.
regards, tom lane