2010/11/15 Artur Zając <azajac@ang.com.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