 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
rick_townsend
Joined: 12 Oct 2009 Posts: 14 Country: New Zealand |
|
Variables not displayed in list on long scripts |
|
When editing a script with over 10K lines, only static objects (tables, views, etc) are displayed in the auto-complete list. Variables no longer show up in the list, and in fact pressing CTRL+SPACE after a "@" brings up the mesage "There are no local vaiables available".
To replicate:
1) create a script with "declare @a as int" on one of the first lines
2) add 10,000 blank lines
3) on line 10,000, type "set @", notice that "@a" is shown
4) on line 10,001, type "set @", notice that "@a" is shown
5) on line 10,002, type "set @", notice that no variables are shown
5) on line 10,002, type "set @" and press CTRL+SPACE, notice that the message "There are no local vaiables available" is shown.
The same behaviour seems to hold for all lines past 10,001. Note that it makes no difference if there are any "GO" batch separators in the script.
Occurred for me in a 10.5K line stored procedure that beaks aparts and validates 4,799 fields from an XML file.
SQL Assistant version 4.8.29
Last edited by rick_townsend on Mon Mar 29, 2010 11:59 pm; edited 1 time in total |
|
Mon Mar 29, 2010 11:35 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
This is by design. SQL Assistant uses various performance optimization techniques. One of them is limiting the scope of look ahead and look back code parsing. In other words, when dealing with a very long script, it is parsing only a limited number of lines relative to the cursor location. That's why after certain number of lines you may stop getting some prompts, like prompts for variable names.
|
|
Mon Mar 29, 2010 11:46 pm |
|
 |
rick_townsend
Joined: 12 Oct 2009 Posts: 14 Country: New Zealand |
|
|
|
Could you make it a configuration setting, that just defaults to 10,000? So when we hit scripts this big we could just up the limit so it covers the range we need? I'd be willing to wait longer for parse results - better than no results at all.
|
|
Mon Mar 29, 2010 11:52 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I don't know if that's an option and I cannot answer your question right way. I'd need to run it by our development folks.
|
|
Tue Mar 30, 2010 12:06 am |
|
 |
rick_townsend
Joined: 12 Oct 2009 Posts: 14 Country: New Zealand |
|
|
|
Ok, thanks. I've posted it on the enhancement suggestion thread.
|
|
Tue Mar 30, 2010 3:48 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|