Dne 17.12.2010 22:24, Tom Lane napsal(a): > That seems likely to be even more unreliable than our existing > single-column estimates :-( > > regards, tom lane
Well, yes :-( I guess this is a place where we could use a multi-column index, if it contains all the interesting columns. We could scan the index, not the whole table. That could save us tremendous amount of I/O and should be quite precise (unless it's severely bloated). Another thing is those 'discrete' columns are usually quite stable, i.e. there's usually a limited list of values and it does not change very often. Think about ZIP codes, states, etc. And the combinations are quite stable too (counties do not move to other states, etc.). So I think scanning a reasonable part of a table should be enough in these cases. regards Tomas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers