Devart Blog

Improving Performance for Parsing UNION Clause in SQL Complete

Posted by on December 27th, 2010

In the previous article we told that we’ve performed a lot of work concerning optimization of parsing queries in SQL documents. Also we informed that we’ve fixed all problems that were found by users of our intellisense… But recently one user sent us quite a small script that caused freezing of SSMS by Devart SQL Complete. Here it is:

BEGIN TRAN

declare @dt table(
	str_date varchar(10),
	str_name varchar(100),
	int_size int
)

insert into @dt
select           '2010-02-01', 'str1001', 1001
union all select '2010-02-02', 'str1002', 1002
union all select '2010-02-03', 'str1003', 1003
-- another 200 lines of union all select
union all select '2010-12-10', 'str1204', 1204

ROLLBACK

We’ve fixed this bug successfully and the fix was included in the new build of our prompt SQL tool. You can view the complete list of fixes in dbForge SQL Complete, v1.00.62.

Download a free add-in for SQL Server Management Studio by Devart.

Leave a Reply