Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: SP Performance Difference

    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...

  • RE: SP Performance Difference

    Thank you Gail, you've been most helpful

  • RE: SP Performance Difference

    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...

  • RE: SP Performance Difference

    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...

  • RE: SP Performance Difference

    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...

  • RE: SP Performance Difference

    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 *...

  • RE: SP Performance Difference

    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...

Viewing 7 posts - 1 through 7 (of 7 total)