Re: [PERFORM] partition queries hitting all partitions even though check key is specified

2010-07-12 Thread Joshua D. Drake
On Mon, 2010-07-12 at 22:01 -0500, Josh Berkus wrote: > On 9/2/09 10:05 AM, Kevin Kempter wrote: > > On Wednesday 02 September 2009 09:02:27 Scott Marlowe wrote: > >> On Wed, Sep 2, 2009 at 8:52 AM, Kevin Kempter > > wrote: > >>> Hi all; > >>> > >>> I cant figure out why we're scanning all of our

Re: [PERFORM] partition queries hitting all partitions even though check key is specified

2010-07-12 Thread Josh Berkus
On 9/2/09 10:05 AM, Kevin Kempter wrote: > On Wednesday 02 September 2009 09:02:27 Scott Marlowe wrote: >> On Wed, Sep 2, 2009 at 8:52 AM, Kevin Kempter > wrote: >>> Hi all; >>> >>> I cant figure out why we're scanning all of our partitions. I don't think extract() is immutable, which would prett

Re: [PERFORM] Slow query with planner row strange estimation

2010-07-12 Thread phb07
Dimitri a écrit : It's probably one of the cases when having HINTS in PostgreSQL may be very helpful.. SELECT /*+ enable_nestloop=off */ ... FROM ... will just fix this query without impacting other queries and without adding any additional instructions into the application code.. So, why the

Re: [PERFORM] Need help in performance tuning.

2010-07-12 Thread Bruce Momjian
Craig Ringer wrote: > It'll need to separate "running queries" from "running processes", or > start threading backends, so that one way or the other a single query > can benefit from the capabilities of multiple CPUs. The same separation, > or a move to async I/O, might be needed to get one query t

Re: [PERFORM] performance on new linux box

2010-07-12 Thread Greg Smith
Ryan Wexler wrote: One question I do have is this card has a setting called Read Policy which apparently helps with sequentially reads. Do you think that is something I should enable? Linux will do some amount of read-ahead in a similar way on its own. You run "blockdev --getra" and "blockd

Re: [PERFORM] Pooling in Core WAS: Need help in performance tuning.

2010-07-12 Thread Hannu Krosing
On Mon, 2010-07-12 at 18:58 +0800, Craig Ringer wrote: > On 12/07/10 17:45, Matthew Wakeling wrote: > > > > I'm surprised. Doesn't apache httpd do this? Does it have to do a whole > > load of non-portable stuff? It seems to work on a whole load of platforms. > > A lot of what Apache HTTPd does is

Re: [PERFORM] Exists, limit and alternate plans

2010-07-12 Thread Tom Lane
=?KOI8-U?B?96bUwcymyiD0yc3eydvJzg==?= writes: > So, my Qs: > 1) Do we really have alternative plans for SubPlan that are selected at > runtime? Wow. Yup, see the AlternativeSubPlan stuff. > 2) Why "Seq scan" plan is selected by default? Is it because of outer limit > not being applied when calcu

[PERFORM] Exists, limit and alternate plans

2010-07-12 Thread Віталій Тимчишин
Hello. Today I've found out strange results for query below. select version(); version -- PostgreSQL 8.4.2 on amd64-portbld-freebsd8.0, compile

Re: [PERFORM] now() gives same time within the session

2010-07-12 Thread Kenneth Marshall
On Mon, Jul 12, 2010 at 06:11:31AM -0700, Rob Wultsch wrote: > On Mon, Jul 12, 2010 at 4:15 AM, A. Kretschmer > wrote: > > In response to atul.g...@globaldatapoint.com : > >> Hi, > >> > >> > >> > >> I need to log the start and end time of the procedures in a table. But the > >> start and end time

Re: [PERFORM] now() gives same time within the session

2010-07-12 Thread A. Kretschmer
In response to Rob Wultsch : > On Mon, Jul 12, 2010 at 4:15 AM, A. Kretschmer > wrote: > > Use timeofday() instead, now() returns the transaction starting time. > > > Is this part of the SQL standard? Don't know, sorry. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 016

Re: [PERFORM] now() gives same time within the session

2010-07-12 Thread Thom Brown
On 12 July 2010 14:11, Rob Wultsch wrote: > On Mon, Jul 12, 2010 at 4:15 AM, A. Kretschmer > wrote: >> In response to atul.g...@globaldatapoint.com : >>> Hi, >>> >>> >>> >>> I need to log the start and end time of the procedures in a table. But the >>> start and end time are same. This is how I r

Re: [PERFORM] now() gives same time within the session

2010-07-12 Thread Rob Wultsch
On Mon, Jul 12, 2010 at 4:15 AM, A. Kretschmer wrote: > In response to atul.g...@globaldatapoint.com : >> Hi, >> >> >> >> I need to log the start and end time of the procedures in a table. But the >> start and end time are same. This is how I recreated the issue. >> >> >> >> create table test_time

Re: [PERFORM] Pooling in Core WAS: Need help in performance tuning.

2010-07-12 Thread Kevin Grittner
Craig Ringer wrote: > So rather than asking "should core have a connection pool" perhaps > what's needed is to ask "what can an in-core pool do that an > external pool cannot do?" (1) It can prevent the most pessimal performance problems resulting from lack of an external connection pool (or

Re: [PERFORM] PostgreSQL PITR - more doubts

2010-07-12 Thread Kevin Grittner
Jayadevan M wrote: >> Yes, It starts out form "where it needs to". Assuming you >> did a pg_start_backup() before you did your base backup? > > Thanks. I did. > It uses files like 000B00D9.0020.backupto get > the necessary information? Yeah, since it's a text file, you ca

Re: [PERFORM] now() gives same time within the session

2010-07-12 Thread Atul.Goel
Sure thanks a lot. Regards, Atul Goel -Original Message- From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of A. Kretschmer Sent: 12 July 2010 12:15 To: pgsql-performance@postgresql.org Subject: Re: [PERFORM] now() gives same time with

Re: [PERFORM] PostgreSQL PITR - more doubts

2010-07-12 Thread Jayadevan M
> Yes, It starts out form "where it needs to". Assuming you >did a pg_start_backup() before you did your base backup? Thanks. I did. It uses files like 000B00D9.0020.backupto get the necessary information? Regards, Jayadevan DISCLAIMER: "The information in this e-mail

Re: [PERFORM] PostgreSQL PITR - more doubts

2010-07-12 Thread Jesper Krogh
On 2010-07-12 13:23, Jayadevan M wrote: Hello all, One doubt about how PostgreSQL PITR works. Let us say I have all the archived WALs for the past week with archive_command = 'cp -i %p /home/postgres/archive/%f Yes, It starts out form "where it needs to". Assuming you did a pg_start_backup()

[PERFORM] PostgreSQL PITR - more doubts

2010-07-12 Thread Jayadevan M
Hello all, One doubt about how PostgreSQL PITR works. Let us say I have all the archived WALs for the past week with archive_command = 'cp -i %p /home/postgres/archive/%f http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] now() gives same time within the session

2010-07-12 Thread A. Kretschmer
In response to atul.g...@globaldatapoint.com : > Hi, > > > > I need to log the start and end time of the procedures in a table. But the > start and end time are same. This is how I recreated the issue. > > > > create table test_time (time timestamp); > > delete from test_time; > > insert

[PERFORM] now() gives same time within the session

2010-07-12 Thread Atul.Goel
Hi, I need to log the start and end time of the procedures in a table. But the start and end time are same. This is how I recreated the issue. create table test_time (time timestamp); delete from test_time; insert into test_time select now(); SELECT pg_sleep(10); insert into test_time select no

Re: [PERFORM] Pooling in Core WAS: Need help in performance tuning.

2010-07-12 Thread Craig Ringer
On 12/07/10 17:45, Matthew Wakeling wrote: > > I'm surprised. Doesn't apache httpd do this? Does it have to do a whole > load of non-portable stuff? It seems to work on a whole load of platforms. A lot of what Apache HTTPd does is handled via the Apache Portable Runtime (APR). It contains a lot o

Re: [PERFORM] Pooling in Core WAS: Need help in performance tuning.

2010-07-12 Thread Matthew Wakeling
On Sat, 10 Jul 2010, Tom Lane wrote: Doesn't pgpool do this? No, and in fact that's exactly why the proposed implementation isn't ever going to be in core: it's not possible to do it portably. I'm surprised. Doesn't apache httpd do this? Does it have to do a whole load of non-portable stuff?

Re: [Fwd: Re: [PERFORM] Slow query with planner row strange estimation]

2010-07-12 Thread damien hostin
-Ooops sorry for the spam- -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

[Fwd: Re: [PERFORM] Slow query with planner row strange estimation]

2010-07-12 Thread damien hostin
-- HOSTIN Damien - Equipe R&D Tel:+33(0)4 63 05 95 40 Société Axège 23 rue Saint Simon 63000 Clermont Ferrand www.axege.com --- Begin Message --- Robert Haas a écrit : On Wed, Jul 7, 2010 at 10:39 AM, damien hostin wrote: Hello again, At last, I check the same query with the same data on

Re: [PERFORM] Slow query with planner row strange estimation

2010-07-12 Thread Dimitri
It's probably one of the cases when having HINTS in PostgreSQL may be very helpful.. SELECT /*+ enable_nestloop=off */ ... FROM ... will just fix this query without impacting other queries and without adding any additional instructions into the application code.. So, why there is a such resistan