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?
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)