NervousRex
Programmer
There is one stored procedure that is giving me tons of grief. When I run it in Query Analyzer, it takes 6-10 secs to run. But when called through an application, it is taking 5+ mins.
For whatever reason, it is not being run directly when called through coldfusion, but through sp_prepexec instead Here is the entry from my Profiler Trace file. The duration was 429096.
I also call through a .NET application, and it runs as normal (called directly)...not as fast as in analyzer, but not nearly as bad as when coldfusion calls it.
I appreciate any help that can be offered
Thanks
For whatever reason, it is not being run directly when called through coldfusion, but through sp_prepexec instead Here is the entry from my Profiler Trace file. The duration was 429096.
Code:
declare @P1 int
set @P1=1
declare @P2 bit
set @P2=1
declare @P3 bit
set @P3=1
declare @P4 bit
set @P4=1
declare @P5 bit
set @P5=1
declare @P6 bit
set @P6=1
declare @P7 bit
set @P7=1
declare @P8 bit
set @P8=1
declare @P9 bit
set @P9=0
declare @P10 bit
set @P10=1
declare @P11 bit
set @P11=1
declare @P12 bit
set @P12=1
declare @P13 bit
set @P13=1
declare @P14 bit
set @P14=1
declare @P15 bit
set @P15=1
exec sp_prepexec @P1 output, N'@P1 int,@P2 datetime,@P3 bit OUTPUT,@P4 bit OUTPUT,@P5 bit OUTPUT,@P6 bit OUTPUT,@P7 bit OUTPUT,@P8 bit OUTPUT,@P9 bit OUTPUT,@P10 bit OUTPUT,@P11 bit OUTPUT,@P12 bit OUTPUT,@P13 bit OUTPUT,@P14 bit OUTPUT,@P15 bit OUTPUT,@P16 bit OUTPUT', N'EXEC usp_Appointment_Validation @P1, @P2, @P3 OUTPUT, @P4 OUTPUT, @P5 OUTPUT, @P6 OUTPUT, @P7 OUTPUT, @P8 OUTPUT, @P9 OUTPUT, @P10 OUTPUT, @P11 OUTPUT, @P12 OUTPUT, @P13 OUTPUT, @P14 OUTPUT, @P15 OUTPUT, @P16 OUTPUT ', 972489, 'May 30 2007 1:00:00:000PM', @P2 output, @P3 output, @P4 output, @P5 output, @P6 output, @P7 output, @P8 output, @P9 output, @P10 output, @P11 output, @P12 output, @P13 output, @P14 output, @P15 output
select @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15
I also call through a .NET application, and it runs as normal (called directly)...not as fast as in analyzer, but not nearly as bad as when coldfusion calls it.
I appreciate any help that can be offered
Thanks