Query fluctuates .... Strange strange .....

From: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Cc: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
Subject: Query fluctuates .... Strange strange .....
Date: 2013-01-02 19:08:27
Message-ID: 2C0926ABD16BB641A8E2F11A549200423DBF93BC2D@PHXCCRPRD01.adprod.bmc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PG 8.3.7 on HP 11.31.
Very strong Server with lots of memory.
A query runs that inserts 40K records takes 1 second when run from psql.
It takes 20 minutes!! And 100% CPU !! when called from a standalone JDBC program.
No other users are running !!!

The problematic query:

2013-01-02 15:00:38.008 ISTLOG: duration: 1207547.589 ms execute <unnamed>: insert into CMR_IOALOG_2 select * from
CMR_IOALOG_PRE where ORDERNO in (select ORDERNO from CMR_AJF_PRE) or ORDERNO=0

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2013-01-02 19:22:16 Re: Is there any plugin for Nagios, which sends Postgresql ERROR information with SQL query in mail?
Previous Message Kirk Wythers 2013-01-02 17:16:39 un-pivot with crosstab?