Skip site navigation (1) Skip section navigation (2)

Re: statement stuck when the connection grew up to 45 or more

From: "Jan Cruz" <malebug(at)gmail(dot)com>
To: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: statement stuck when the connection grew up to 45 or more
Date: 2006-06-02 07:08:58
Message-ID: 493da2780606020008w541f6676n69818d826cf30dc5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
This is the statement which having problem:
     select count(distinct empno) as counter1 from pay_master_history
           where empno in (select empno from pay_batch_basic_history where
organizationid like '015003%')
     and processyear = '2006'
     and processmonth = '05'
     and processbatch = '1'

SELECT COUNT (*) FROM (
SELECT empno as counter1 from pay_master_history as a
INNER JOIN (select empno from pay_batch_basic_history where organizationid
like '015003%'      and processyear = '2006'
     and processmonth = '05'
     and processbatch = '1') as b
ON b.empno = a.empno ) as count_result
-----------------------------
or just create the view and use inner join then count :b

In response to

pgsql-bugs by date

Next:From: Magnus HaganderDate: 2006-06-02 08:48:43
Subject: Re: Infinite increment of postgre.exe in taskmanager
Previous:From: Stefan van AalstDate: 2006-06-02 06:29:00
Subject: Infinite increment of postgre.exe in taskmanager

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group