<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SQL Server 2008 : new binary – hex string conversion functionality can dramatically improve related query performance by orders of magnitude.</title><link>http://blogs.msdn.com/b/mssqlisv/archive/2008/10/31/sql-server-2008-new-binary-hex-string-conversion-functionality-can-dramatically-improve-related-query-performance-by-orders-of-magnitude.aspx</link><description>In previous SQL Server releases it wasn’t possible to convert binary data to string characters in hex format directly, because SQL Server did not have a built-in Transact-SQL command for converting binary data to a hexadecimal string. The Transact-SQL</description><dc:language>en</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: SQL Server 2008 : new binary – hex string conversion functionality can dramatically improve related query performance by orders of magnitude.</title><link>http://blogs.msdn.com/b/mssqlisv/archive/2008/10/31/sql-server-2008-new-binary-hex-string-conversion-functionality-can-dramatically-improve-related-query-performance-by-orders-of-magnitude.aspx#9027476</link><pubDate>Sat, 01 Nov 2008 02:26:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9027476</guid><dc:creator>Jose</dc:creator><description>&lt;p&gt;I like that sql 2008 has support for converting binary into hex strings, that's great !!!, however i still wish it would also support operations on varbinary columns like BITWISE AND/OR/XOR, do you know if that is in the plan for future?&lt;/p&gt;
&lt;p&gt;Also the last 2 queries in your post got me thinking a little bit.&lt;/p&gt;
&lt;p&gt;Looks like the &amp;quot;WHERE&amp;quot; clause in the query was first converting a varbinary field into a string then doing the comparison, and that conversion is ging to be done for every row in the table.&lt;/p&gt;
&lt;p&gt;I think it would be more performant to convert once the string to match into a varbinary variable, then use the varbinary variable to use in the select statement to compare direclty varbinary with varbinary, or is it not possible to do that with varbinary fields?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9027476" width="1" height="1"&gt;</description></item></channel></rss>