LP_CUSTOMER_RANK runtime

Hello friends!

I am continuing to add to our ranking procedure and am starting to get concerned with the runtime. Currently sitting at about 60ms. I am hoping to use this thread as a little poll for how long this procedure runs for those of you that have customized it. 

I would love any tips for optimizing as well! 

I've also considered creating a nightly procedure that runs the bulk of the ranking updates and then reserving LP_CUSTOMER_RANK for incremental updates during the day. Has anyone had success with this approach?

I use this to check runtime:

DECLARE @start datetime,
		@end datetime

SET @start = GETDATE()
EXEC [LP_CUSTOMER_RANK] @customer_no=193457
SET @end = GETDATE()

SELECT @start, @end

Thanks, 

Parents
  • We use LP_CUSTOMER_RANK quite a bit: we use it both to compute rank and to apply a few constituencies: these are both key to making TNEW responsive to customer behavior, making sure that customers can received benefits from past purchases even if they log back in a few minutes after the initial purchase.  Performance is an ongoing concern.

    This might help with your speed test, but to be sure times are going to be very different depending on what computations wind up being required for the customer at that moment, and what the current requests for those resources are.

    declare @t datetime = CURRENT_TIMESTAMP;
    select top(10000) * from T_CUSTOMER;
    select DATEDIFF(MS, @t, CURRENT_TIMESTAMP) as ms;

Reply
  • We use LP_CUSTOMER_RANK quite a bit: we use it both to compute rank and to apply a few constituencies: these are both key to making TNEW responsive to customer behavior, making sure that customers can received benefits from past purchases even if they log back in a few minutes after the initial purchase.  Performance is an ongoing concern.

    This might help with your speed test, but to be sure times are going to be very different depending on what computations wind up being required for the customer at that moment, and what the current requests for those resources are.

    declare @t datetime = CURRENT_TIMESTAMP;
    select top(10000) * from T_CUSTOMER;
    select DATEDIFF(MS, @t, CURRENT_TIMESTAMP) as ms;

Children
No Data