Viewing 7 posts - 1 through 7 (of 7 total)
Hi Bob,
A valid point, but yes I did. I'll be re-running this tonight now we've been in production for a few days, but don't expect much improvement as we've changed...
March 29, 2007 at 9:55 am
Gail, unfortunately I'm not a .Net developer either, but I've spoken to our team and although the test procedure we developed DID pass an ad-hoc query to the database, all...
March 29, 2007 at 6:02 am
Gail, not sure why this works but I've declared a second set of variables after the parameters and passed the parameters into these. I've then changed the WHERE clause to...
March 29, 2007 at 4:57 am
Sorry Gail, I know I'm being dense but how do I paste the differing lines, as they're shown as a graphic in Profiler and I can't find a way to...
March 29, 2007 at 4:47 am
Thanks Gail, following should be everything you've asked for but please let me know if I've missed anything.
-------------------------------------------
Stored Procedure
CREATE PROCEDURE [dbo].[usp_Report_010810_GrossProfit_ProductDetailed_ByDeliveryDepot]
@chvStartDepot VARCHAR(4),
@chvEndDepot VARCHAR(4),
@dtsStartDate DATETIME,
@dtsEndDate DATETIME,
@chvStartProduct VARCHAR(7),
@chvEndProduct VARCHAR(7)
AS
SET NOCOUNT ON
SELECT Invoice.LoadingDepot,
InvoiceItem.Product,
Product.Description,
Invoice.InvoiceNo,
Invoice.ThirdPartyOrder,
Invoice.AccountNo,
ISNULL(Account.Name,'') AS Name,
CONVERT(NVARCHAR,Invoice.InvoiceDate,103) AS InvoiceDate,
SUM(InvoiceItem.[Value]) AS TotalInvoiceValue,
SUM(ROUND(InvoiceItem.CostPrice *...
March 29, 2007 at 4:10 am
Ok, I've tried dm_exec_requests, but unfortunately can't run it quick enough to capture the fast-performing instance of the query. However, this should come in useful in future!!
I've re-run profiler and...
March 29, 2007 at 3:06 am
Viewing 7 posts - 1 through 7 (of 7 total)