Re: [PERFORM] Query help

2009-08-05 Thread Subbiah Stalin-XCGF84
affected by queries like these. Stalin -Original Message- From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] Sent: Tuesday, August 04, 2009 8:57 AM To: Subbiah Stalin-XCGF84; pgsql-performance@postgresql.org Subject: RE: [PERFORM] Query help Subbiah Stalin-XCGF84 ssubb...@motorola.com

Re: [PERFORM] Query help

2009-08-05 Thread Scott Carey
- From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] Sent: Tuesday, August 04, 2009 8:57 AM To: Subbiah Stalin-XCGF84; pgsql-performance@postgresql.org Subject: RE: [PERFORM] Query help Subbiah Stalin-XCGF84 ssubb...@motorola.com wrote: Server has 32G memory and it's a dedicated to run PG

Re: [PERFORM] Query help

2009-08-05 Thread Kevin Grittner
Subbiah Stalin-XCGF84 ssubb...@motorola.com wrote: We have found the problem. Great news! Apparently there was a query doing count on 45 million rows table run prior to the episode of slow query. Definitely cached data is pushed out the memory. Yeah, that would completely explain your

Re: [PERFORM] Query help

2009-08-04 Thread Subbiah Stalin-XCGF84
necessary stats on the next occurrence of the slow query. Stalin -Original Message- From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] Sent: Tuesday, August 04, 2009 8:57 AM To: Subbiah Stalin-XCGF84; pgsql-performance@postgresql.org Subject: RE: [PERFORM] Query help Subbiah Stalin

[PERFORM] Query help

2009-08-03 Thread Subbiah Stalin-XCGF84
All, Not sure what's wrong in below execution plan but at times the query runs for 5 minutes to complete and after a while it runs within a second or two. Here is explain analyze out of the query. SELECT OBJECTS.ID,OBJECTS.NAME,OBJECTS.TYPE,OBJECTS.STATUS,OBJECTS.ALTNAME,OBJE

Re: [PERFORM] Query help

2009-08-03 Thread Kevin Grittner
Subbiah Stalin-XCGF84 ssubb...@motorola.com wrote: Not sure what's wrong in below execution plan but at times the query runs for 5 minutes to complete and after a while it runs within a second or two. The plan doesn't look entirely unreasonable for the given query, although it's hard to be

Re: [PERFORM] Query help

2009-08-03 Thread Subbiah Stalin-XCGF84
] Query help Subbiah Stalin-XCGF84 ssubb...@motorola.com wrote: Not sure what's wrong in below execution plan but at times the query runs for 5 minutes to complete and after a while it runs within a second or two. The plan doesn't look entirely unreasonable for the given query, although

Re: [PERFORM] Query help

2009-08-03 Thread Kevin Grittner
Subbiah Stalin-XCGF84 ssubb...@motorola.com wrote: Shared buffer=8G, effective cache size=4G. That is odd; if your shared buffers are at 8G, you must have more than 4G of cache. How much RAM is used for cache at the OS level? Normally you would add that to the shared buffers to get your

Re: [PERFORM] Query help

2009-08-03 Thread Subbiah Stalin-XCGF84
:45 PM To: Subbiah Stalin-XCGF84; pgsql-performance@postgresql.org Subject: RE: [PERFORM] Query help Subbiah Stalin-XCGF84 ssubb...@motorola.com wrote: Shared buffer=8G, effective cache size=4G. That is odd; if your shared buffers are at 8G, you must have more than 4G of cache. How much RAM