Skip to main content
Inspiring
April 8, 2011
Question

Slow stored procedure performance

  • April 8, 2011
  • 2 replies
  • 1172 views

I have a stored procedure that is running fast in SQL Mgmt Studio but is very slow in CF. I've tried running it both using cfstoreproc and cfquery and it's always slow. It wouldn't be a matter of a lot of data being returned either, there are only 64 rows returned. Not sure what it could be, as far as I know we have a number of servers with the same installation and I would think the DB drivers are the same, but maybe I'm missing something. Any ideas?

This topic has been closed for replies.

2 replies

tmessierAuthor
Inspiring
April 13, 2011

Figured it out. Very weird issue, all I had to do was drop the procedure and re-create it. Wonder if for some reason the proc running from CF was using some bad execution plan for some reason. Anyway, that was a simple, if strange fix.

Inspiring
April 8, 2011

To isolate the problem, I would create a very simple sp, something like

select 'x' x

Then run it with Coldfusion and see what sort of exection time you get.

tmessierAuthor
Inspiring
April 8, 2011

There are a lot of other sps in the app I'm working on, and for the most part they run fast. Just to make sure, I took one of them and put it in a simple page, and as expected it ran very fast.