Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 query slow

Author  Topic 

desikankannan
Posting Yak Master

152 Posts

Posted - 2008-02-05 : 23:35:42
Hi,
we are working with crystal report with access, we try to built a query for Delivery chalan and we are using access 2000 but its time to retrive the query from the server machine, herewith iam sending the query pls guide me for the alternative query, this query takes long time to retrive the data. pls guide me.

SELECT Issues.`IssCode`, Issues.`IssDate`, Issues.`IssDCNo`, Issues.`IssOrderno`,
Issues.`ReceiverName`, Issues_details.`slno`, Franchisee_Master.`Fran_Name`, Franchisee_Master.`FAdd1`,
Franchisee_Master.`FAdd2`, Franchisee_Master.`FAdd3`, Franchisee_Master.`FPhone`, ITEM_MASTER.`imName`,
ITEM_MASTER.`imISOCode`, ITEM_MASTER.`poQty`,Issues_details.`IssRetQty`, STATE.`stName`, CITY.`cyName`
From compdet, ((((`Issues` Issues INNER JOIN `Franchisee_Master` Franchisee_Master
ON Issues.`IssReqBy` = Franchisee_Master.`FIntCode`) INNER JOIN `Issues_details` Issues_details ON
Issues.`IssCode` = Issues_details.`IssCode` AND Issues.`IssDate` = Issues_details.`IssDate`) INNER JOIN `STATE` STATE ON
Franchisee_Master.`FStCode` = STATE.`stCode`) INNER JOIN `CITY` CITY ON Franchisee_Master.`FcityCode` = CITY.`cyCode`) INNER JOIN
`ITEM_MASTER` ITEM_MASTER ON Issues_details.`imCode` = ITEM_MASTER.`imCode` WHERE item_master.compid=compdet.compid and
franchisee_master.compid=compdet.compid and Issues_details.compid = compdet.compid and
Issues.compid=compdet.compid and compdet.compid='C00001' and Issues.IssOrderno = '3016' AND Issues.IssDate = '20080202'
AND Issues.IssDCNo = '7458' Order By Issues.`IssCode` ASC, Issues_details.`slno` ASC




Desikankannan

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-02-05 : 23:46:59
What indexes do you have on all of the tables involved in this query?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

desikankannan
Posting Yak Master

152 Posts

Posted - 2008-02-05 : 23:54:36
Hi Kizer,
we are not using any index because its access2000 query, i want this query should be shorten to retrive the data faster.

quote:
Originally posted by tkizer

What indexes do you have on all of the tables involved in this query?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/



Desikankannan
Go to Top of Page
   

- Advertisement -