[PERFORM] Execution Plan

2010-07-22 Thread std pik
Hi all.. Can any one help me? I'd like to know how can we get the following information in PostgreSQL: Execution plan The I/O physical reads and logical reads, CPU consumption, number of DB block used, and any other information relevant to performance. Taking into consideration that these informati

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

2010-07-22 Thread Robert Haas
On Thu, Jul 22, 2010 at 5:29 PM, Andres Freund wrote: >> The problem is harder for us because a backend can't switch identities >> once it's been assigned to a database.  I haven't heard an adequate >> explanation of why that couldn't be changed, though. > Possibly it might decrease the performanc

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

2010-07-22 Thread Robert Haas
On Thu, Jul 22, 2010 at 3:15 PM, Hannu Krosing wrote: > On Thu, 2010-07-22 at 14:36 -0400, Robert Haas wrote: >> On Mon, Jul 12, 2010 at 6:58 AM, 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 d

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

2010-07-22 Thread Scott Carey
On Jul 22, 2010, at 11:36 AM, Robert Haas wrote: > On Mon, Jul 12, 2010 at 6:58 AM, 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?" > > Avoid sending every co

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

2010-07-22 Thread Hannu Krosing
On Thu, 2010-07-22 at 12:15 -0700, Joshua D. Drake wrote: > On Thu, 2010-07-22 at 14:36 -0400, Robert Haas wrote: > > On Mon, Jul 12, 2010 at 6:58 AM, Craig Ringer > > wrote: > > > So rather than asking "should core have a connection pool" perhaps > > > what's needed is to ask "what can an in-cor

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

2010-07-22 Thread Hannu Krosing
On Thu, 2010-07-22 at 14:36 -0400, Robert Haas wrote: > On Mon, Jul 12, 2010 at 6:58 AM, 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?" > > Avoid sending ev

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

2010-07-22 Thread Andres Freund
On Thu, Jul 22, 2010 at 02:33:43PM -0400, Robert Haas wrote: > On Mon, Jul 12, 2010 at 6:58 AM, 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 o

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

2010-07-22 Thread Joshua D. Drake
On Thu, 2010-07-22 at 14:36 -0400, Robert Haas wrote: > On Mon, Jul 12, 2010 at 6:58 AM, 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?" > > Avoid sending e

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

2010-07-22 Thread Robert Haas
On Mon, Jul 12, 2010 at 6:58 AM, 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?" Avoid sending every connection through an extra hop. -- Robert Haas EnterpriseDB:

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

2010-07-22 Thread Robert Haas
On Mon, Jul 12, 2010 at 6:58 AM, 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 handl

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

2010-07-22 Thread Robert Haas
On Mon, Jul 12, 2010 at 4:33 PM, phb07 wrote: > > 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 >> addin

Re: [PERFORM] Using more tha one index per table

2010-07-22 Thread Craig James
On 7/21/10 6:47 PM, Greg Smith wrote: Craig James wrote: By using "current" and encouraging people to link to that, we could quickly change the Google pagerank so that a search for Postgres would turn up the most-recent version of documentation. How do you propose to encourage people to do tha

Re: [PERFORM] Strange explain on partitioned tables

2010-07-22 Thread Philippe Rimbault
Greg, First : thank you for you help. On 22/07/2010 15:32, Greg Smith wrote: Philippe Rimbault wrote: I have one thousand inherited tables like this one (with a different check constraint on each) : The PostgreSQL partitioning system is aimed to support perhaps a hundred inherited tables.

Re: [PERFORM] Strange explain on partitioned tables

2010-07-22 Thread Greg Smith
Philippe Rimbault wrote: I have one thousand inherited tables like this one (with a different check constraint on each) : The PostgreSQL partitioning system is aimed to support perhaps a hundred inherited tables. You can expect to get poor performance on queries if you create 1000 of them.

Re: [PERFORM] Strange explain on partitioned tables

2010-07-22 Thread Philippe Rimbault
FYI I've just installed Postgresql 9 beta 3 (9.0beta3 on i686-pc-linux-gnu, compiled by GCC gcc (Debian 4.4.4-6) 4.4.4, 32-bit) After a pg_upgrade + vacuum analyze, i've got the following results : Query on primary table : select documents.id, documents.num, sources.n

Re: [PERFORM] Using more tha one index per table

2010-07-22 Thread Rob Wultsch
On Thu, Jul 22, 2010 at 1:35 AM, Richard Huxton wrote: > On 22/07/10 03:27, Greg Smith wrote: > >> Steve Atkins wrote: >> >>> If http://postgresql.org/docs/9.0/* were to 302 redirect to >>> http://postgresql.org/docs/current/* while 9.0 is the current release >>> (and similarly for 9.1 and so on)

Re: [PERFORM] Strange explain on partitioned tables

2010-07-22 Thread Philippe Rimbault
Oups! searching on the mailing list show me that it's a known problem ... http://archives.postgresql.org/pgsql-performance/2010-07/msg00063.php sorry ! On 22/07/2010 09:52, Philippe Rimbault wrote: Hi all, I'm using Postgresql 8.4.4 on Debian. In postgresql.conf, constraint_exclusion is se

Re: [PERFORM] Using more tha one index per table

2010-07-22 Thread Richard Huxton
On 22/07/10 03:27, Greg Smith wrote: Steve Atkins wrote: If http://postgresql.org/docs/9.0/* were to 302 redirect to http://postgresql.org/docs/current/* while 9.0 is the current release (and similarly for 9.1 and so on) I suspect we'd find many more links to current and fewer links to specific

Re: [PERFORM] why index is not working in < operation?

2010-07-22 Thread A. Kretschmer
In response to AI Rumman : > I have a table. > > \d email_track > Table "public.email_track" >  Column |  Type   | Modifiers  > +-+ >  crmid  | integer | not null default 0 >  mailid | integer | not null default 0 >  count  | integer | > Indexes: >     "

Re: [PERFORM] why index is not working in < operation?

2010-07-22 Thread Szymon Guz
2010/7/22 AI Rumman > I have a table. > > \d email_track > Table "public.email_track" > Column | Type | Modifiers > +-+ > crmid | integer | not null default 0 > mailid | integer | not null default 0 > count | integer | > Indexes: > "email_track

[PERFORM] why index is not working in < operation?

2010-07-22 Thread AI Rumman
I have a table. \d email_track Table "public.email_track" Column | Type | Modifiers +-+ crmid | integer | not null default 0 mailid | integer | not null default 0 count | integer | Indexes: "email_track_pkey" PRIMARY KEY, btree (crmid, mailid) C

[PERFORM] Strange explain on partitioned tables

2010-07-22 Thread Philippe Rimbault
Hi all, I'm using Postgresql 8.4.4 on Debian. In postgresql.conf, constraint_exclusion is set to "on" I have partitioned tables with check constraints. My primary table : CREATE TABLE documents ( id serial NOT NULL, id_source smallint, nod integer, num te