Re: [PERFORM] Query performance - normal on 9.0.4, slow from 9.0.5 onwards

2012-01-02 Thread Miguel Silva
7; THEN 3 ELSE NULL END AS DELETE_RULE FROM information_schema.table_constraints AS tc JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constrain

Re: [PERFORM] Query performance - normal on 9.0.4, slow from 9.0.5 onwards

2012-01-02 Thread Miguel Silva
On 30-12-2011 19:35, Merlin Moncure wrote: try this (curious): create table pos as select n from generate_series(1,32) n; and swap that for the in-query generate series call. your statistics in the query are completely off (not 100% sure why), so I'm thinking to replace that since it lies to th

Re: [PERFORM] Query performance - normal on 9.0.4, slow from 9.0.5 onwards

2011-12-30 Thread Miguel Silva
On 30-12-2011 17:40, Tom Lane wrote: Miguel Silva writes: But with postgresql version 9.0.5 (in version 9.0.4 all was fine), we noticed the program was taking longer to start. In fact, in some clients that had older hardware, it could take around 20 minutes when it usually takes only a few

[PERFORM] Query performance - normal on 9.0.4, slow from 9.0.5 onwards

2011-12-30 Thread Miguel Silva
eys. Of course, it is possible to change the code and use a (different) manual query that does the same and runs perfectly fine, I've already done that. But why does this happen, from 9.0.5 on? Is there any idea? Is this situation already known? I hope someone can enlighten me on