Re: limit clause breaks query planner? - Mailing list pgsql-performance

From Matt Smiley
Subject Re: limit clause breaks query planner?
Date
Msg-id 48BFCA55.D078.0028.0@rentrak.com
Whole thread Raw
In response to Re: limit clause breaks query planner?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
"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
expressionassociated 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
selectivityestimates for the expression's otherwise opaque data distribution.  The expression might be treated as a
virtualcolumn on the table; not sure if that helps or hurts.  Should I post this question on pgsql-hackers? 



pgsql-performance by date:

Previous
From: Kiran Mukhyala
Date:
Subject: inaccurate stats on large tables
Next
From: Ulrich
Date:
Subject: More shared_buffers instead of effective_cache_size?