> Joshua sent us some preliminary data with this query and others and indicated > that we could post it. He wanted time to clean it up > and re-run some experiments, but the data is generally good and the algorithm > performs as expected. I have attached this data to the > post. Note that the last set of data (although labelled as Z7) is actually > an almost zero skew database and represents the worst-case > for the algorithm (for most queries the optimization is not even used).
Sadly, there seem to be a number of cases in the Z7 database where the optimization makes things significantly worse (specifically, queries 2, 3, and 7, but especially query 3). Have you investigated what is going on there? I had thought that we had sufficient safeguards in place to prevent this optimization from kicking in in cases where it doesn't help, but it seems not. There will certainly be real-world databases that are more like Z7 than Z1. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers