Re: [PERFORM] How to clock the time spent for query parsing and planning?

2011-12-30 Thread Pavel Stehule
2011/12/31 Igor : > Hi Pavel, > > Thanks for your reply. > > My understanding is that Explain provides measurements of query run time but > does not include or specifies the timing for  planning and for running > optimization algorithms. the a result of explain is visualisation of execution plan

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

2011-12-30 Thread Tom Lane
Miguel Silva writes: > I work for a software company that has it's main program installed on > over 200 clients. This program uses a small local database in > postgresql. Always installed with the one-click installer and > postgresql.conf left on default settings. This structure allows us to >

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

2011-12-30 Thread Merlin Moncure
On Fri, Dec 30, 2011 at 10:39 AM, Miguel Silva wrote: > Hi all! > > I've ran into a performance problem a few time ago and I've been trying to > figure out a solution until now. But since I've failed to come up with > anything conclusive, it's time to ask some help from people with more > understa

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 seco

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

2011-12-30 Thread Tom Lane
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 seconds. To make a long story sho

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

2011-12-30 Thread Miguel Silva
Hi all! I've ran into a performance problem a few time ago and I've been trying to figure out a solution until now. But since I've failed to come up with anything conclusive, it's time to ask some help from people with more understanding of how postgresql works. Here's the big picture. I wor

Re: [PERFORM] partitioned table: differents plans, slow on some situations

2011-12-30 Thread Matteo Sgalaberni
I'm sorry, I pasted the wrong ones, but the results are the same, here A and B again: Query A # EXPLAIN ANALYZE SELECT sms.id AS id_sms FROM sms_messaggio AS sms, sms_messaggio_dlr AS dlr WHERE sms.id = d

Re: [PERFORM] partitioned table: differents plans, slow on some situations

2011-12-30 Thread Marcin Mirosław
W dniu 30.12.2011 17:01, Matteo Sgalaberni pisze: > Hi, Hello, > I have a two tables that are partitioned by month. > > I have different results for the same query (query A/query B), the only thing > that differ from A and B is the customer id. Not only: > Query A: > > SELECT sms.id AS id_sm

[PERFORM] partitioned table: differents plans, slow on some situations

2011-12-30 Thread Matteo Sgalaberni
Hi, I have a two tables that are partitioned by month. I have different results for the same query (query A/query B), the only thing that differ from A and B is the customer id. Query A: SELECT sms.id AS id_sms                                                    FROM                        sms