pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matt Smiley <mss@rentrak.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: david.west@cusppoint.com
Cc: pgsql-performance@postgresql.org
Subject: Re: limit clause breaks query planner?
Date: Thu, 04 Sep 2008 11:45:37 -0700
Message-ID: <48BFCA55.D078.0028.0@rentrak.com> (raw)
In-Reply-To: <23341.1220542340@sss.pgh.pa.us>
References: <48BD33B2.D078.0028.0@rentrak.com>
	<48BD33B2.D078.0028.0@rentrak.com>
	<5925.1220389248@sss.pgh.pa.us>
	<48BF195E.D078.0028.0@rentrak.com>
	<48BF195E.D078.0028.0@rentrak.com>
	<23341.1220542340@sss.pgh.pa.us>

"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> I'm not sure offhand whether the existing correlation stats would be of use for
> it, or whether we'd have to get ANALYZE to gather additional data.

Please forgive the tangent, but would it be practical to add support for gathering statistics on an arbitrary expression associated with a table, rather than just on materialized columns?  For example:
    analyze my_tab for expression 'my_func(my_tab.col)' ;
It seems like any time you'd consider using a functional index, this feature would let the planner calculate decent selectivity estimates for the expression's otherwise opaque data distribution.  The expression might be treated as a virtual column on the table; not sure if that helps or hurts.  Should I post this question on pgsql-hackers?





view thread (26+ messages)  latest in thread

Message-ID: <48BFCA55.D078.0028.0@rentrak.com>
Permalink:  ../48BFCA55.D078.0028.0@rentrak.com/
Also on:    postgresql.org/message-id/48BFCA55.D078.0028.0@rentrak.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: mss@rentrak.com, tgl@sss.pgh.pa.us, david.west@cusppoint.com
  Subject: Re: limit clause breaks query planner?
  In-Reply-To: <48BFCA55.D078.0028.0@rentrak.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