November 7, 2008 at 9:45 am
We are planning to use a CLR assembly for performing regular expression comparisons. the code is based on the SqlRegex example from MSDN.
Running on development machines, and our test server the following queries returns in around 1-2 seconds.
declare @i int
select @i = dbo.RegexMatch('00' ,'00|14|1A|1B|1C|22|23|26|27|30|31|34|35|36|37')
print @i
go 800
On our production servers, the same query takes around 20 seconds to complete. The differences between the test and production systems are...
Dev/Test is 32bit running on Windows 2003 / Vista
Live is 64bit running on Windows 2008
For a test, we created a new test server running 64bit Windows 2008 and again the query was very slow, around the same timings as on live.
Has anyone else had a similar problem?
Thanks
David
November 7, 2008 at 10:35 am
Fixed my own problem. It turns out to be nothing to do with sql.
Compiled regular expressions are very slow on 64bit.
http://www.bokebb.com/dev/english/1939/posts/193912680.shtml
the solution is to remove the RegOptions.complied settings
David
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply