Re: [PERFORM] Slow query after upgrade to 8.4

2009-09-24 Thread tv
Hello postgres wizards, We recently upgraded from 8.1.5 to 8.4 We have a query (slow_query.sql) which took about 9s on 8.1.5 On 8.4, the same query takes 17.7 minutes. The code which generated this query is written to support the calculation of arbitrary arithmetic expressions across

Re: [PERFORM] Slow query after upgrade to 8.4

2009-09-24 Thread Jared Beck
On Wed, Sep 23, 2009 at 10:35 PM, Tom Lane t...@sss.pgh.pa.us wrote: One thing that is hobbling the performane on 8.4 is that you have work_mem set to only 1MB Other things you might try include increasing join_collapse_limit to 12 or so, and reducing random_page_cost. Another thing to

[PERFORM] Slow query after upgrade to 8.4

2009-09-23 Thread Jared Beck
Hello postgres wizards, We recently upgraded from 8.1.5 to 8.4 We have a query (slow_query.sql) which took about 9s on 8.1.5 On 8.4, the same query takes 17.7 minutes. The code which generated this query is written to support the calculation of arbitrary arithmetic expressions across variables

Re: [PERFORM] Slow query after upgrade to 8.4

2009-09-23 Thread Greg Williamson
Beck ja...@singlebrook.com To: pgsql-performance@postgresql.org Cc: Leon Miller-Out l...@singlebrook.com Sent: Wednesday, September 23, 2009 12:53:15 PM Subject: [PERFORM] Slow query after upgrade to 8.4 Hello postgres wizards, We recently upgraded from 8.1.5 to 8.4 We have a query

[PERFORM] Slow query after upgrade to 8.4

2009-09-23 Thread Jared Beck
Hello postgres wizards, We recently upgraded from 8.1.5 to 8.4 We have a query (slow_query.sql) which took about 9s on 8.1.5 On 8.4, the same query takes 17.7 minutes. The code which generated this query is written to support the calculation of arbitrary arithmetic expressions across variables