Re: [PERFORM] Query planner ignoring constraints on partitioned tables when joining

2013-04-18 Thread Tom Lane
Michael Okner writes: > I've been able to reproduce the issue in a generic environment and posted the > code to create this environment on my GitHub at > https://github.com/mikeokner/pgsql_test. The query plans demonstrating this > issue are pasted here: http://bpaste.net/show/92138/. I've poke

Re: [PERFORM] SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

2013-04-18 Thread Vitalii Tymchyshyn
I'd say you either have overloaded application (try increasing timeout), too small pool (increase pool) or connection leaks (find and fix). 18 квіт. 2013 23:45, "itishree sukla" напис. > Dear All, > > Can any one please help me to fix this issue, i am getting this error from > our application, cu

Re: [PERFORM] High CPU usage buy low I/O wait

2013-04-18 Thread k...@rice.edu
On Thu, Apr 11, 2013 at 04:30:54PM -0700, bing1221 wrote: > Our server is running postgresql 8.4.15. During day time the cpu usage always > around 80%, but it's not IO bound. The swap space is looking OK also. Also > we setup pgbadger and enable all logs to monitor the slow query but they all > fin

[PERFORM] High CPU usage buy low I/O wait

2013-04-18 Thread bing1221
Our server is running postgresql 8.4.15. During day time the cpu usage always around 80%, but it's not IO bound. The swap space is looking OK also. Also we setup pgbadger and enable all logs to monitor the slow query but they all finished quick. Usually it has 60 incoming connections, and we have p

Re: [PERFORM] [GENERAL] SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

2013-04-18 Thread Alfonso Afonso
Hi Itsrhree >From the machine where is running the tomcat, do you check that you can >connect to postgresql server (remember check parameters of connection, user, >password, ip)? Having this first step tested, then: Do you have the correct connection pool configured on Catalina (Tomcat) and le

[PERFORM] SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

2013-04-18 Thread itishree sukla
Dear All, Can any one please help me to fix this issue, i am getting this error from our application, currently Database is running on 9.2. 2013-04-17 11:37:25:151 - {ERROR} database.ConnectionManager Thread [http-8080-1]; --- getConnection() Exception: org.apache.commons.dbcp.SQLNestedException

[PERFORM] Query planner ignoring constraints on partitioned tables when joining

2013-04-18 Thread Michael Okner
Hello all, I'm running into an issue when joining between to tables that are partitioned by month. At this point I'm leaning towards it being a bug in the planner but it could be due to something I'm not doing properly as well. Each parent table is empty and has about 30 child tables, and there

Re: [PERFORM] "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan

2013-04-18 Thread Tom Lane
dmitry potapov writes: > I recently stumbled upon on what could be a planner bug or a corner case. > If " OR ..." is added to WHERE clause of SELECT query, > then the planner chooses a very inefficient plan. Consider a query: > SELECT count(k0.id) > FROM k0 > WHERE 1 = 2 > OR k0.id IN ( >

Re: [PERFORM] "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan

2013-04-18 Thread Richard Huxton
On 18/04/13 15:20, dmitry potapov wrote: Hello, I recently stumbled upon on what could be a planner bug or a corner case. If " OR ..." is added to WHERE clause of SELECT query, then the planner chooses a very inefficient plan. Consider a query: If I comment out "1=2 OR", then the plan changes

[PERFORM] "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan

2013-04-18 Thread dmitry potapov
Hello, I recently stumbled upon on what could be a planner bug or a corner case. If " OR ..." is added to WHERE clause of SELECT query, then the planner chooses a very inefficient plan. Consider a query: SELECT count(k0.id) FROM k0 WHERE 1 = 2 OR k0.id IN ( SELECT k1.k0_id FRO