Re: statement stuck when the connection grew up to 45 or more - Mailing list pgsql-bugs

From Jan Cruz
Subject Re: statement stuck when the connection grew up to 45 or more
Date
Msg-id 493da2780606020008w541f6676n69818d826cf30dc5@mail.gmail.com
Whole thread Raw
In response to Re: statement stuck when the connection grew up to 45 or more  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List 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

pgsql-bugs by date:

Previous
From: "Stefan van Aalst"
Date:
Subject: Infinite increment of postgre.exe in taskmanager
Next
From: "Magnus Hagander"
Date:
Subject: Re: Infinite increment of postgre.exe in taskmanager