pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Kane <tim.kane@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Constraint exclusion won't exclude parent table
Date: Tue, 13 May 2014 21:57:10 +0100
Message-ID: <CF9840D4.7F03D%tim.kane@gmail.com> (raw)
In-Reply-To: <27718.1400012679@sss.pgh.pa.us>
References: <CF9838D8.7EF3D%tim.kane@gmail.com>
	<27718.1400012679@sss.pgh.pa.us>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

> 
> 
> 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
> 

view thread (3+ messages)

Message-ID: <CF9840D4.7F03D%tim.kane@gmail.com>
Permalink:  ../CF9840D4.7F03D%25tim.kane@gmail.com/
Also on:    postgresql.org/message-id/CF9840D4.7F03D%tim.kane@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tim.kane@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Constraint exclusion won't exclude parent table
  In-Reply-To: <CF9840D4.7F03D%tim.kane@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox