Bonediggler1
Technical User
Hi-
Why would a query using three CTEs take 30 seconds to run, and the same code as a SP takes 30 minutes?
The only difference is passing the parameter to the SP rather than declaring/setting it in code. The parameter is as follows:
DECLARE @ACCTGID INT
SET @ACCTGID = 201009
Thank you!!
Why would a query using three CTEs take 30 seconds to run, and the same code as a SP takes 30 minutes?
The only difference is passing the parameter to the SP rather than declaring/setting it in code. The parameter is as follows:
DECLARE @ACCTGID INT
SET @ACCTGID = 201009
Thank you!!