SQL Prompt Refreshing very slowly, different query when connecting to DB
BiestMode
Posts: 3 Bronze 2
in SQL Prompt
Hello, we've got quite a few complaints about slowness in a recent update of prompt. I've got some notes below on what I've found so far trying to troubleshoot this issue.
We have some workstations still on Prompt 10.14.21.9884 that are not affected by the issue and others on 10.14.23.11448 that are reporting the slowness. We're on the same network connected to the same databases. When you refresh suggestions on the system running 10.14.23.11448 prompt is querying the object definition for all stored procedures which takes quite a long time to complete. Doing the same thing on the older copy of prompt does not do this and instead is running a more lightweight set of queries to gather a list of objects in the DB.
This is the query in question we see running on the newer version that is taking over 6 minutes to complete that kicks off as soon as you connect a tab to a database. When I was profiling the older version of prompt this I never saw an instance of this query being used.
We have some workstations still on Prompt 10.14.21.9884 that are not affected by the issue and others on 10.14.23.11448 that are reporting the slowness. We're on the same network connected to the same databases. When you refresh suggestions on the system running 10.14.23.11448 prompt is querying the object definition for all stored procedures which takes quite a long time to complete. Doing the same thing on the older copy of prompt does not do this and instead is running a more lightweight set of queries to gather a list of objects in the DB.
This is the query in question we see running on the newer version that is taking over 6 minutes to complete that kicks off as soon as you connect a tab to a database. When I was profiling the older version of prompt this I never saw an instance of this query being used.
SELECT
obj.id AS object_id,
OBJECT_DEFINITION(obj.id) AS object_definition
FROM (VALUES ... **huge list of stored procedures here**
SQL Server Management Studio 20.2.30.0
FROM (VALUES ... **huge list of stored procedures here**
SQL Server Management Studio 20.2.30.0
Tagged:
Answers
Thanks for reaching out to Redgate Software and sorry to hear you are seeing some slowness on SQL Prompt's latest release. Would it be possible for you to place SQL Prompt in Verbose (SQL Prompt > Help > Enable Verbose Logging) and repeat the same test where you are seeing the extended slowness and then attach those logs here?
Thanks for the follow up,
I was able to find out that the behavior for Stored Procedures in the latest version of Prompt did indeed change.
- Default values of Stored Procedure Parameters are now being displayed in suggestions.
Which was in 10.14.22.11347, so if you install the Prompt version prior to this one, I imagine your loading speeds will speed up for the time being. I currently have this escalated as a Performance Issue with SQL Prompt, so if you do end up finding time to test this in your end, I would kindly ask that the test be performed as such:I can then make a comparison on the loading times and provide that to Development for remediation.
I just installed SQL Prompt 10.15.3.12768 just so I can experience this penomenon too. Being the DBA I saw more and more of those Select-Queries @BiestMode described in the first post. I wondered why I didn't experience those behaviour. So I installed said version manually (because the auto updater said SQL Prompt was already up to date).
The little UI-Window just keeps displaying
Processing parameters…
{Loading bar approx. 25% filled}
The end of the verbose log reads like this (cleaned sensitive data)
Thanks for chiming in, thankfully this issue has now since been replicated by development and they are currently testing the fix we are planning to implement. Once that has cleared smoke testing and is released in a new version of SQL Prompt, I will circle back here and let you guys know. Looking at the solution, it seems to be significantly faster after the fix is applied.
Cheers,
Christian Perez
Product Support