I have a query that hardly took 2 seconds on Query Analyzer and is taking forever in Full CLient and thin client.
As a matter of fact the Full client on my machine freezes when i run this query and i have to kill the process everytime.
I am using SQL Server 2000 on Win XP.
Andy’s post was helpful and I went through that earlier as I had Webi problems as well and I found out that I have to upgrade to 6.1b or 6.5.
I am not worried about Thin CLient for now. I assume if it is taking 2 secs in Qery Analyzer, it should take 3-5 secs in Full CLient. It does not return any rows, just sits in the analyzing phase. The query has some aggregation; just for reference below is the query
SELECT
Claims.Aid_Category_Code,
AidCategory.Aid_Category_Description,
count(distinct(( Claims.re_unique_id ))),
sum(Claims.Paid_Amount_Dtl),
Claims.Category_of_Service,
CategoryService.Category_Of_Service_Description,
Clients.Residence_Region
FROM
dbo.HWMF_V_CLAIMS Claims,
dbo.HWMF_T_STATE_AID_CATEGORY AidCategory,
dbo.HWMF_T_CTG_OF_SVC CategoryService,
dbo.HWMF_T_CLIENTS Clients
WHERE
( Claims.re_unique_id=Clients.re_unique_id )
AND ( Claims.Category_of_Service=CategoryService.Category_Of_Service )
AND ( Claims.Aid_Category_Code=AidCategory.Aid_Category_Code )
AND
(
( Claims.Transaction_Status_Code_Dtl IN ('5','6') AND Claims.Transaction_Type_Code_Dtl IN ('3','4') AND Claims.Current_IND = 'C' )
AND
Claims.From_Date_of_Service_Dtl BETWEEN '01/01/2003 00:0:0' AND '12/31/2003 00:0:0'
AND
Claims.Aid_Category_Code = '55'
)
GROUP BY
Claims.Aid_Category_Code,
AidCategory.Aid_Category_Description,
Claims.Category_of_Service,
CategoryService.Category_Of_Service_Description,
Clients.Residence_Region
[added bbc CODE formatting for better readibility - Andreas]
Is it possible for any of the Claims.Paid_Amount_Dtl values to be NULL. I have had problems with 6.1a and having NULL values in columns that I was summing.
If this is possible, can you try to use whatever function (ISNULL) to substitute 0s in for the NULLs? When I did this, it worked great!
Thanks for your reply. At the database level Claims.Paid_Amount_Dtl can be Null, but in this query I have a condition for Paid Claims only. So in this query it cant be Null.
Still the problem persists. It says analyzing…
Also, the connection thing is out of question as I am able to run other queries on the same universe on Full Client.