Re: Setting Statistics on Functional Indexes - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Setting Statistics on Functional Indexes
Date
Msg-id 20121029185114.79490@gmx.com
Whole thread Raw
In response to Setting Statistics on Functional Indexes  (Shaun Thomas <sthomas@optionshouse.com>)
List pgsql-performance
Shaun Thomas wrote:

> I know that current_date seems like an edge case, but I can't see
> how getting the most recent activity for something is an uncommon
> activity. Tip tracking is actually the most frequent pattern in the
> systems I've seen.

Yeah, this has been a recurring problem with database statistics
with various products for at least 20 years. For a while I was using
a product whose optimizer engineers referred to it as "data skew" and
recommended adding a "dummy" entry to get a single value out past the
maximum end of the range. If you couldn't stomach the dummy data,
they had detailed instructions for dumping your statistics, tinkering
with the end of it to allow for the issue, and writing it back over
the actual statistics gathered. We need a better answer than that.

> I just wonder if this particular tweak isn't more of a regression
> than initially thought.

It does seem like we have a serious regression in terms of this
particular issue.

-Kevin


pgsql-performance by date:

Previous
From: salah jubeh
Date:
Subject: Re: Request for help with slow query
Next
From: "Woolcock, Sean"
Date:
Subject: Re: Request for help with slow query