pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marty Frasier <m.frasier@escmatrix.com>
Cc: pgsql-performance@postgresql.org, James Quinn <j.quinn@escmatrix.com>
Subject: Re: how to help the planner
Date: Thu, 28 Mar 2013 12:18:46 -0400
Message-ID: <868.1364487526@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAX5s64o2LCF0cWNqDMTiM1JuSyyESvh1T1QW1cmDTpi4n2rdg@mail.gmail.com>
References: <CAAX5s64o2LCF0cWNqDMTiM1JuSyyESvh1T1QW1cmDTpi4n2rdg@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Marty Frasier <m.frasier@escmatrix.com> writes:
> We've been using postgreSQL for a few years.  This is my first post here
> and first real dive into query plans.

One quick thought is that it's probably worth cranking up
join_collapse_limit and/or from_collapse_limit, since the number of
relations in the query is considerably more than the default values of
those limits.  This will make planning take longer but possibly find
better plans.  I'm not sure it will help a lot, since most of the
problem is evidently bad rowcount estimates, but it might help.

Also it seems like the major rowcount failing is in the estimate for the
t12 subquery.  I can't tell why that particular combination of WHERE
clauses is giving it such a hard time --- is there something odd about
the distribution of 'cahsee_ela' tests?  Why is that particular subquery
grouped over school/student when all the others are grouped over just
student?

			regards, tom lane


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (5+ messages)  latest in thread

Message-ID: <868.1364487526@sss.pgh.pa.us>
Permalink:  ../868.1364487526@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/868.1364487526@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, m.frasier@escmatrix.com, j.quinn@escmatrix.com
  Subject: Re: how to help the planner
  In-Reply-To: <868.1364487526@sss.pgh.pa.us>

* 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