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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance Issues | LINQ query - multiple inner joins

Status
Not open for further replies.

monkey64

Technical User
Apr 27, 2008
69
GB
I have a LINQ query which has multiple inner joins. I've got a feeling that this is not perhaps the most efficient way to acheive my result. I hace a recorset of 16k rows and the query executes in 8-10 seconds.

What can I do to speed it up?

Code:
SELECT     Stock.CatalogueNo, StockCategories.[Section], StockCategories.Category, StockCategories.Header, Stock.Description, Stock.SingleMeasure, 
                      StockPricesTrade.Unit, Stock.StockLevel, Stock.Picture, Stock.PostageCode, StockPricesTrade.Price AS tprice, StockPricesTrade.Vat AS tvat, 
                      StockPricesRetail.Price AS rprice, StockPricesRetail.Vat AS rvat
FROM         (((((Stock INNER JOIN
                      StockCategories ON Stock.CatalogueNo = StockCategories.CatalogueNo) INNER JOIN
                      StockPricesTrade ON Stock.CatalogueNo = StockPricesTrade.CatalogueNo) LEFT OUTER JOIN
                      StockPricesEuro ON Stock.CatalogueNo = StockPricesEuro.CatalogueNo) LEFT OUTER JOIN
                      [StockPricesUS$] ON Stock.CatalogueNo = [StockPricesUS$].CatalogueNo) LEFT OUTER JOIN
                      StockPricesRetail ON Stock.CatalogueNo = StockPricesRetail.CatalogueNo)
WHERE     (Stock.CatalogueWeb = True) OR
                      (Stock.TradeWeb = true)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top