Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Joins in ASP

Status
Not open for further replies.

TomBarrand

Programmer
Aug 9, 2000
162
GB
A colleague of mine is using an sql join within an asp page and the page just times out. The syntax is ok as this works fine through sql query analyzer.

SELECT dbo.Purch_Ord_Line.Description
FROM dbo.Purch_Ord_Hdr INNER JOIN
dbo.Purch_Ord_Line ON dbo.Purch_Ord_Hdr.Purch_Ord_No = dbo.Purch_Ord_Line.Purch_Ord_No AND
dbo.Purch_Ord_Hdr.Revision_No = dbo.Purch_Ord_Line.Revision_No

Any suggestions?

Thanks
 
What are you then doing with the results, and how many records are you expecting to return from this? Derren
[Mediocre talent - spread really thin]
 
There will only ever be one result as it is using the SQL SUM aggregate function. The sql is also part of a loop with one value in the where clause being changed.

Any further thoughts?

Thanks
 
Use Query Analyzers Time Execution property and determine how much time it need to execute the satement.

Always Joins are problem because they take more time to join the tables and fetch results.

So try to optimize the SQL statement and rewrite it.
You can write the same SQL in as well 1500 ways !

Companies like lECCOTECH and Embarocadero in California provides this solution through artificial intelligece but it is damm costly !!! Rushi Shroff Rushi@emqube.com
"Life is beautiful."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top