Re: [PERFORM] Major performance problem after upgrade from 8.3 to 8.4

2010-09-14 Thread Gerhard Wiesinger
Hello Merlin, Seems to be a feasible approach. On problem which might be that when multiple rows are returned that they are not ordered in each subselect correctly. Any idea to solve that? e.g. Raumsolltemperatur | Raumisttemperatur Value from time 1 | Value from time 2 Value from time 2 |

Re: [PERFORM] Useless sort by

2010-09-14 Thread Heikki Linnakangas
On 13/09/10 19:48, Tom Lane wrote: Gaetano Mendolamend...@gmail.com writes: Of course I'm not suggesting to take away the sort by and give the user an unsorted result, I'm asking why the the optimizer in cases like: select unique(a) from v_table_with_order_by; doesn't takes away the

Re: [PERFORM] Major performance problem after upgrade from 8.3 to 8.4

2010-09-14 Thread Merlin Moncure
On Tue, Sep 14, 2010 at 2:07 AM, Gerhard Wiesinger li...@wiesinger.com wrote: Hello Merlin, Seems to be a feasible approach. On problem which might be that when multiple rows are returned that they are not ordered in each subselect correctly. Any idea to solve that? e.g. Raumsolltemperatur

Re: [PERFORM] Useless sort by

2010-09-14 Thread Maciek Sakrejda
You could check for volatile functions. I think this could be done safely. I don't think that's enough. A UDA like last() could have an immutable sfunc, but still be sensitive to the sort order. I think you'd need something like a special order-sensitive aggregate definition flag. --- Maciek

[PERFORM] Held idle connections vs use of a Pooler

2010-09-14 Thread mark
Hello, I am relatively new to postgres (just a few months) so apologies if any of you are bearing with me. I am trying to get a rough idea of the amount of bang for the buck I might see if I put in a connection pooling service into the enviroment vs our current methodology of using persistent

Re: [PERFORM] Useless sort by

2010-09-14 Thread Dave Crooke
I presume there is more usage of this view than just those 3 queries (otherwise, for a start there would be no need for d, e, f in the view definition) Why not just rewrite these 3 queries to go directly off the main table? Or, create a different view without the sort_by in its definition? Or,

Re: [PERFORM] Held idle connections vs use of a Pooler

2010-09-14 Thread Joshua D. Drake
On Tue, 2010-09-14 at 10:10 -0600, mark wrote: Hello, I am relatively new to postgres (just a few months) so apologies if any of you are bearing with me. I am trying to get a rough idea of the amount of bang for the buck I might see if I put in a connection pooling service into the

Re: [PERFORM] Held idle connections vs use of a Pooler

2010-09-14 Thread Merlin Moncure
On Tue, Sep 14, 2010 at 12:10 PM, mark dvlh...@gmail.com wrote: Hello, I am relatively new to postgres (just a few months) so apologies if any of you are bearing with me. I am trying to get a rough idea of the amount of bang for the buck I might see if I put in a connection pooling service

Re: [PERFORM] Useless sort by

2010-09-14 Thread Gaetano Mendola
On Tue, Sep 14, 2010 at 6:15 PM, Dave Crooke dcro...@gmail.com wrote: I presume there is more usage of this view than just those 3 queries (otherwise, for a start there would be no need for d, e, f in the view definition) Why not just rewrite these 3 queries to go directly off the main table?

Re: [PERFORM] Held idle connections vs use of a Pooler

2010-09-14 Thread Craig James
On 9/14/10 9:10 AM, mark wrote: Hello, I am relatively new to postgres (just a few months) so apologies if any of you are bearing with me. I am trying to get a rough idea of the amount of bang for the buck I might see if I put in a connection pooling service into the enviroment vs our current

Re: [PERFORM] Major performance problem after upgrade from 8.3 to 8.4

2010-09-14 Thread Gerhard Wiesinger
On Tue, 14 Sep 2010, Merlin Moncure wrote: On Tue, Sep 14, 2010 at 2:07 AM, Gerhard Wiesinger li...@wiesinger.com wrote: Hello Merlin, Seems to be a feasible approach. On problem which might be that when multiple rows are returned that they are not ordered in each subselect correctly. Any

Re: [PERFORM] Major performance problem after upgrade from 8.3 to 8.4

2010-09-14 Thread Merlin Moncure
On Tue, Sep 14, 2010 at 3:59 PM, Gerhard Wiesinger li...@wiesinger.com wrote: On Tue, 14 Sep 2010, Merlin Moncure wrote: On Tue, Sep 14, 2010 at 2:07 AM, Gerhard Wiesinger li...@wiesinger.com wrote: Hello Merlin, Seems to be a feasible approach. On problem which might be that when