[BUGS] Bad pg_stats.correlation with repeated keys.

2013-08-16 Thread Ralph Loader
Hi, I'm experiencing a performance problem with sql queries on a table with large numbers of repeated keys. I've tracked it down to the pg_stats.correlation being overly optimistic. The structure is: * Tables of ~ 100 million 100 byte rows, with a per-second timestamp. * A single btree index o

[BUGS] Bad pg_stats.correlation with repeated keys.

2013-08-15 Thread Ralph Loader
Hi, I'm experiencing a performance problem with sql queries on a table with large numbers of repeated keys. I've tracked it down to the pg_stats.correlation being overly optimistic. The structure is: * Tables of ~ 100 million 100 byte rows, with a per-second timestamp. * A single btree index o