From: | Artur Zając <azajac(at)ang(dot)com(dot)pl> |
---|---|
To: | "'Robert Haas'" <robertmhaas(at)gmail(dot)com> |
Cc: | <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Difference between explain analyze and real execution time |
Date: | 2010-11-15 20:43:48 |
Message-ID: | 009d01cb8505$ce738900$6b5a9b00$@ang.com.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
2010/11/15 Artur Zając <azajac(at)ang(dot)com(dot)pl>:
> Why there is so big difference between explain analyze (0.710 ms) and
> real execution time (3309 ms)? Any suggestions?
> Could it be that it takes a long time to plan for some reason? How fast
is a plain EXPLAIN?
Yes! That is it :) Planning is painful. I'm so stupid. I didn't check VACUUM
without ANALYZE :)
time psql -c 'explain SELECT te.idt FROM t_positions AS te WHERE te.idtr
IN (347186)'
real 0m1.087s
user 0m0.004s
sys 0m0.001s
I've changed default_statistics_target to 10000 and I think that is a
reason. When I changed it to 1000 everything seems to be ok:
time psql -c 'explain analyze SELECT te.idt FROM t_positions AS te WHERE
te.idtr IN (347186)'
real 0m0.062s
user 0m0.003s
sys 0m0.004s
Thanks.
-------------------------------------------
Artur Zajac
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-11-15 21:03:55 | Re: Difference between explain analyze and real execution time |
Previous Message | Humair Mohammed | 2010-11-15 20:14:26 |