Re: Constraint exclusion won't exclude parent table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Yeah, it's not expected that that's going to cost much.  I am suspicious
that what you are looking at is mostly measurement overhead: during
EXPLAIN ANALYZE, each plan node has to do two gettimeofday() calls per
call, and there are lots of platforms where that is significant relative
to the actual work done per node.

You might try comparing the overall times for select count(*) from ...
rather than EXPLAIN ANALYZE for these two cases.  If those times are
much closer together than what you're getting from EXPLAIN ANALYZE,
then you've got a machine with expensive gettimeofday() and you have
to take your measurements with an appropriate quantum of salt.

regards, tom lane

Interesting.. 

Direct query:
Time: 374336.514 ms

Indirect query:
Time: 387114.059 ms

Mystery solved. Thanks again Tom.

For what it’s worth: Linux 3.2.0-4-amd64  Debian 3.2.46-1+deb7u1 x86_64


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux