Tom Lane wrote:
Hm, it sure looks to be exactly the same plan. The performance difference seems to be just that the seqscans are faster. I surmise that in the 7.3 database you had a lot of dead rows, or at least a lot of free space. Possibly you need to vacuum more often to keep down the amount of junk in the tables.
The two databases were created from scratch and the first operation on it ( after a vacuum analyze ) was just that query.
I will try to pump up the statistic target.
The default_statistics_target was already 1000 for postgres7.4beta2 and after setting this value to 1000 for postgres7.3.3 I had the same explain with the same expected row ( almost 400 ) and the almost the same time execution.
Another piece: The query
SELECT ud.* FROM user_data ud, class_default cd WHERE ud.id_class = cd.id_class AND cd.id_provider = 39;
( I removed the huge table )
take just few ms to be executed.
Regards Gaetano Mendola
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html