Something that might be worth considering:
Many of the performance problems on pgsql-general seem to be related to the fact that no analyze is performed after the
creationon the tables, so
maybe this might be an option to fix that (in future releases): when a table has no statistics at all, and the first
seq-scanon the table is
performed, it might improve further performance if this seq-scan is used to get table statistics too. This should not
betoo expensive since reading the
table has to be done only once. Further queries will have at least preliminary statistics at hand.
I'm not sure how (CPU) expensive statistic-gathering is, but if most of the work is reading the tuples, it might be a
winto do this.
Regards,
Mario Weilguni