Connecting Tech Pros Worldwide Forums | Help | Site Map

Slow Query Processing

Newbie
 
Join Date: May 2007
Posts: 6
#1: May 30 '07
SELECT DISTINCT "MCOMP"."MCMP_NAME", "MLOC"."MLOC_NAME", "MDEP"."MDEP_NAME", "TDAY"."TDAY_EMPCDE", "MEMPOFF"."MEMP_NAME", "TDAY"."TDAY_SFTREPO", "TDAY"."TDAY_DATE", "TDAY"."TDAY_EXHR", "TDAY"."TDAY_SFTASSG", "MEMPOFF"."MEMP_CODE"
FROM ((("krishna"."dbo"."TDAY" "TDAY" INNER JOIN "krishna"."dbo"."MEMPOFF" "MEMPOFF" ON "TDAY"."TDAY_EMPCDE"="MEMPOFF"."MEMP_CODE") INNER JOIN "krishna"."dbo"."MCOMP" "MCOMP" ON "MEMPOFF"."MEMP_CMPCD"="MCOMP"."MCMP_CODE") INNER JOIN "krishna"."dbo"."MDEP" "MDEP" ON "MEMPOFF"."MEMP_DEPCD"="MDEP"."MDEP_CODE") INNER JOIN "krishna"."dbo"."MLOC" "MLOC" ON "MEMPOFF"."MEMP_LOCCD"="MLOC"."MLOC_CODE"
ORDER BY "MCOMP"."MCMP_NAME", "MLOC"."MLOC_NAME", "MDEP"."MDEP_NAME", "MEMPOFF"."MEMP_NAME"

I am using Crystal Report XI and SQL Server 2000.
This is my SQL Query,Generated by the Database -> Show SQL Query.
If I am running this Query in SQL Query Analyzer than it takes above 15 min to show the output, and there are 1039131 records from this output.
Is there is any way to reduse the time it takes to show the output.

Thanks

Regards,
Komal.

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,509
#2: May 30 '07

re: Slow Query Processing


Please do not post duplicate threads , as u have already posted the same question a day before.
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,509
#3: May 30 '07

re: Slow Query Processing


Since it contails a lot of records, try creating indexes on frequently used columns.
Reply