What are the challenges you face when working across database platforms? Take the survey

SQL Prompt - lag in typed code appearing

USFRMerrillUSFRMerrill Posts: 3
edited May 3, 2013 11:43AM in SQL Prompt Previous Versions
As I type in the Query Window I am able to type 30 + character before the characters appear on the screen.
Version: Professional Edition
Items tested
1. When the query is saved (does not matter if local to PC or network) the slowness appears
2. If "Disable Code Suggestion" is set then there is NOT a performance issue.
3. Red Gate log file reports the below error.
4. Checked for update. No new updates.
5. Query is only 134 lines

Error log
02 May 2013 13:37:24,329 [11] ERROR RedGate.SqlPrompt.Metadata.Options.OptionsBase - Couldn't read options on attempt 0
System.IO.IOException: The process cannot access the file 'C:\Users\rmerrill\AppData\Local\Red Gate\SQL Prompt 5\RedGate_SqlPrompt_Engine_EngineOptions.xml' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at RedGate.SqlPrompt.Metadata.Options.OptionsBase.(Type )


  • Options
    Scratch the original posted error message. That was due to attempting to increase this setting <ParserLookBackDistance>5000</ParserLookBackDistance>

    This did not make a difference.
  • Options
    Anu DAnu D Posts: 876 Silver 3
    Many thanks for your post and apologies for inconvenience caused.

    If you wish to alter the behaviour of SQL Prompt where it does not suggest variables over large blocks of SQL or fails to provide help with large scripts, you can edit the RedGate_SQLPrompt_Engine_EngineOptions.xml file.

    This file should be in the below location:

    %USERPROFILE%\AppData\Local\Red Gate\SQL Prompt 5

    The string in the file you need to edit is <ParserLookBackDistance>5000</ParserLookBackDistance><ParserLookAheadDistance>3000</ParserLookAheadDistance>

    The figure detailed here is in bytes. You can decrease the look back distance as much as you like. However please be aware that increasing the value; depending on your hardware, there may be a considerable degradation in the performance of the tool.

    Please let me know how you get on.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
Sign In or Register to comment.