SQL Server Studio 2005 slow down.
unionguy
Posts: 13
I have just installed SQL Prompt and it's great but it does not seems to handle large scripts very well.
The 1st problem I found was that when I arrow down over a PRINT statement is hangs.
Then 2nd problem I found was that if I have a DECALRE that is not at the top of my script and arrow down over it, it hangs.
The 3rd problem I have found is if I comment out code using /*Insert code here*/ and arrow down over this code it hangs.
The 4th problem I have found is the following line of code. The code is commented out so I don't know why it cause the tool to hand but it does.
--SET IDENTITY_INSERT TableName OFF
For small scripts this tool seems to work great but I do alot of data conversions and my scripts tend to be larger, so it is just slowing me down and I had to uninstall it.
Are there any settings that I turn on/off to fix solve my problems?
The 1st problem I found was that when I arrow down over a PRINT statement is hangs.
Then 2nd problem I found was that if I have a DECALRE that is not at the top of my script and arrow down over it, it hangs.
The 3rd problem I have found is if I comment out code using /*Insert code here*/ and arrow down over this code it hangs.
The 4th problem I have found is the following line of code. The code is commented out so I don't know why it cause the tool to hand but it does.
--SET IDENTITY_INSERT TableName OFF
For small scripts this tool seems to work great but I do alot of data conversions and my scripts tend to be larger, so it is just slowing me down and I had to uninstall it.
Are there any settings that I turn on/off to fix solve my problems?
Comments
Sorry to see you're having difficulties. Unfortunately SQL Prompt has problems coping with large scripts that contain few GO blocks since it uses these for accurately scoping variables etc. We've had to be quite focussed about what goes into the 3.1 release so we've not been able to look at this problem, however we intend to address it for the next 3.x release of SQL Prompt.
If you can somehow add a whole bunch of GO batch markers into your scripts you should find that the situation improves significantly. You might try turning off support for variables (you'll find this on the Candidates tab in the options dialog at the bottom) however I suspect that on a script of the size you're editing you'll experience only a marginal improvement. As I say, the best option is to get regular GO markers in there if at all possible.
Hope that helps.
Thanks,
Bart
Principal Consultant
bartread.com Ltd
My $0.02
This is hauntingly similar to the old Prompt SQL 2.1 "spin the CPU like crazy" era - I hope it doesn't last...
By the way, I'm using the 3.1 beta...
In case I should attract a similar "refactor" comment from VisualDragon, the code is clearly laid out, comprising a load of differing DML statements around two table-variables, with one line per column, per standards, with error-trapping logic thrown in... Refactoring opportunities minimal
Decide wisely...
Thanks,
Bart
Principal Consultant
bartread.com Ltd
Decide wisely...
To be honest you're probably best off disabling SQL Prompt when you're working on that proc, at least for now, however I'm hoping we'll have a dev build of the next version of SQL Prompt available in a month or so that will address this issue. If you're feeling brave you might try refactoring and decomposing it into a number of smaller procedures and/or functions, but that's potentially a little risky so I could certainly understand if you were a bit reticent about doing that.
Sorry I can't be more immediate help.
Thanks,
Bart
Principal Consultant
bartread.com Ltd
I turned SQL Prompt off yesterday as I was waiting 30 seconds to apply an indent to 15 lines of code...
Definitely looking forward to the 3.2 beta
Decide wisely...
Cheers,
Bart
Principal Consultant
bartread.com Ltd
-Pete
Our support for large SQL scripts is significantly improved in SQL Prompt 3.5. The release candidate is now available for download:
http://www.red-gate.com/messageboard/vi ... php?t=5263
I'd recommend you download it and give it a try.
Thanks,
Bart
Principal Consultant
bartread.com Ltd