EXPLAIN ANALYZE output
От | David Rysdam |
---|---|
Тема | EXPLAIN ANALYZE output |
Дата | |
Msg-id | 43B18EE6.3020208@ll.mit.edu обсуждение исходный текст |
Ответы |
Re: EXPLAIN ANALYZE output
Re: EXPLAIN ANALYZE output |
Список | pgsql-general |
I'm afraid I still don't understand the output of EXPLAIN ANALYZE. The output I get is like this: blah blah blah (cost=A..B blah blah) (actual time=C..D blah blah) According to what I've been able to find: A = predicted time to first returned row in milliseconds B = total cost in arbitrary units C = actual time to first returned row in milliseconds D = actual total time in milliseconds 1) Is this correct? I had a query that was taking a long time and I spent the last day and a half trying to reduce D. I probably should have been working on reducing C, but that's neither here nor there. Nothing I've done has had any appreciable effect, with both C and D staying around 170000-200000 (~= 3 minutes), including dropping the sort condition. After all this head-on-wall banging, I went back and tried doing the query without EXPLAIN ANALYZE. It takes under a minute, even with the sort turned on. 2) Does EXPLAIN ANALYZE add a lot of overhead that is being measured here? 3) Even if so, why has the output of EXPLAIN ANALYZE not dropped even though the query itself is now faster (due to something I did while working on C/D?)? There's been plenty of vacuuming and analyzing on these tables, so outdated stats are not the answer.
В списке pgsql-general по дате отправления: