Hi, I had a similar problem with many left join, reading about planning optimization i tried to edit postgresql.conf and uncommented the line join_collapse_limit = 8 and set it to 1, disables collapsing of explicit . My query its taking 2000s in 8.4 and the same query 2ms in 8.3. Now its working fast in 8.4. Best regards, Marc -- View this message in context: http://postgresql.1045698.n5.nabble.com/Major-performance-problem-after-upgrade-from-8-3-to-8-4-tp2796390p3329435.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance