pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: 7k records into Sort node, 4.5m out?
Date: Wed, 15 Aug 2012 17:25:06 -0700
Message-ID: <502C3DE2.9060703@agliodbs.com> (raw)
In-Reply-To: <20520.1345067076@sss.pgh.pa.us>
References: <D2CA9292-023A-4DF4-82B8-6E99CE82CCB1@thebuild.com>
	<dda48e8e4cd63cc6f98f9eca78016c05.squirrel@sq.gransy.com>
	<32B51AEA-E940-40CF-BA54-C7D4E3E1F0D7@thebuild.com>
	<10304.1344910305@sss.pgh.pa.us>
	<623F2FF3-B79D-419A-929A-41C707DD5EA3@thebuild.com>
	<16268.1345063872@sss.pgh.pa.us>
	<502C0E6B.1040402@agliodbs.com>
	<20520.1345067076@sss.pgh.pa.us>


> If you can show us the anonymized query plan, why not the anonymized query?
> It doesn't look like it could be all that complicated.

It's not:

SELECT COUNT(*)
FROM "user"
INNER JOIN "house"
      ON ("user"."house_id" = "house"."id")
LEFT OUTER JOIN "district"
      ON ("house"."district_id" = "district"."id")
WHERE ("user"."status" = 0
     AND ("district"."update_status" = 2
                OR "district"."update_status" = 3 )
     AND ("user"."valid" = 1
                OR "user"."valid" = 3 )
     AND "district"."is_test" = false );

However, since the anonymization above doesn't quite match that used in
the EXPLAIN plan, I'm not sure what you'll get out of it.  And yes, we
know that the outer join is being invalidated.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com




view thread (13+ messages)  latest in thread

Message-ID: <502C3DE2.9060703@agliodbs.com>
Permalink:  ../502C3DE2.9060703@agliodbs.com/
Also on:    postgresql.org/message-id/502C3DE2.9060703@agliodbs.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: josh@agliodbs.com, tgl@sss.pgh.pa.us
  Subject: Re: 7k records into Sort node, 4.5m out?
  In-Reply-To: <502C3DE2.9060703@agliodbs.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