﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Don Peterson / Article Discussions / Article Discussions by Author  / Beware of Search Argument (SARG) Data Types / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 23:50:10 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Thanks, and your're welcome.  I'm glad to know that the article was useful.</description><pubDate>Sun, 05 Dec 2010 12:30:59 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>I think this is one of those things in the back of my head I always knew, and just never really appreciated just how intrusive the problem could be.Awesome article, great presentation, and thank you.  You may have just fixed something for me on Monday. :-D</description><pubDate>Sun, 05 Dec 2010 01:27:08 GMT</pubDate><dc:creator>Evil Kraig F</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>I agree with many of the others.  This is a "hidden" performance problem that a lot of people don't even consider because they don't know about things like data-type precedence.  It's one of the primary reasons why some folks think Tally Table functions are slow and why some cursors appear to be faster than certain setbased queries.Very well done, DC... this should be required reading not only for those learning SQL, but for those teaching it, as well.</description><pubDate>Sat, 04 Dec 2010 09:54:01 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>This was a great article.  I was researching why DevExpress XPO was doing this on the back end as well.  Keep in mind, this is derived from the system.data.sqlclient class and most of the ORMs inherit that class to build on top for SQL server.We realized a 8X difference, on average, from changing the datatype.  I will say we have high performance SANs and multi-proc servers to handle the storage and CPU load, but this kept me from having to go clustered and deal with updating multiple servers and increased performance like night and day.This article was a God send.  I really appreciate the effort!Wallew</description><pubDate>Tue, 30 Nov 2010 19:42:46 GMT</pubDate><dc:creator>wwallace-692342</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Great Stuff&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description><pubDate>Fri, 13 Jul 2007 08:10:00 GMT</pubDate><dc:creator>Dave Ott</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Great article.  Very informative.</description><pubDate>Fri, 13 Jul 2007 06:51:00 GMT</pubDate><dc:creator>Dave F-425609</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Thanks for the feedback!  Any ideas on how to prevent unicode when NHibernate and the native SQL drivers are used?&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description><pubDate>Mon, 23 Oct 2006 15:39:00 GMT</pubDate><dc:creator>Dan Skutt</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Dave,&lt;/P&gt;&lt;P&gt;Thanks for the clarification.  After consulting with the configuration team, it is indeed a jTDS setting.  I knew that we were using that particular JDBC driver, but their emails initially indicated that it was a JBoss setting...&lt;/P&gt;</description><pubDate>Mon, 23 Oct 2006 07:48:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>The sendStringParametersAsUnicode is a property of the JDBC driver being used.  The jTDS driver supports this parameter, as does one of the commercial SQL Server 2000 drivers (although I don't recall which one).http://jtds.sourceforge.net/faq.html#urlFormatBe sure to check your JDBC driver documentation for supported properties.Dave</description><pubDate>Sat, 21 Oct 2006 08:30:00 GMT</pubDate><dc:creator>David Kilzer</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;It was actually in JBoss...  &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;In the apollo-ds.xml file you need to add the following in the &amp;lt;datasources&amp;gt; section.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;&amp;lt;xa-datasource-property name="SendStringParametersAsUnicode"&amp;gt;false&amp;lt;/xa-datasource-property&amp;gt;&lt;/FONT&gt;&lt;/P&gt;</description><pubDate>Sat, 21 Oct 2006 08:22:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Great article.  What setting was changed to stop Hibernate from sending Unicode?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description><pubDate>Fri, 20 Oct 2006 13:55:00 GMT</pubDate><dc:creator>Dan Skutt</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>I loved the examples... nice and simple.  Great job, DC.</description><pubDate>Sun, 08 Oct 2006 11:59:00 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;No, Hibernate does not explicitly force your data model to reflect the object model, however the net result is nearly that, at least in my experience.  Admittedly this is a very small sampling that provides only anecdotal evidence and may not fully support the statement in the article.  However, the development team has had direct access to a "Hibernate expert" and they are reportedly following his recommendations.&lt;/P&gt;&lt;P&gt;There are some pretty severe limitations that we have run across as well.  Every object referenced in your Hibernate queries must actually exist in the database so derived tables, CTEs and temporary tables are out of the question.  Hibernate also chokes on varibles so any kind of more complex queries and cursors are out too.  Hibernate can apparently make use of stored procedures but at the cost of greatly diminished pagination and sorting functionality.&lt;/P&gt;</description><pubDate>Wed, 19 Jul 2006 18:41:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Indexes on computed columns are an option, but ultimately they are not quite as useful as function based indexes IMO.&lt;/P&gt;</description><pubDate>Wed, 19 Jul 2006 18:20:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>BTW I was able to confirm that the new driver is indeed the JTDS driver.  Seems to be working fine and provide a small, but noticable improvement over the MS JDBC driver.</description><pubDate>Wed, 19 Jul 2006 18:16:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Classic ORM is Object Role Modelling, not Object Relational Mapping.&lt;/P&gt;&lt;P&gt;Everything else in this article about SARG is brilliant.&lt;/P&gt;&lt;P&gt;Here are the references to the source on ORM:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.orm.net/pdf/springer.pdf#search='terry%20halpin%20object%20role%20modeling'"&gt;http://www.orm.net/pdf/springer.pdf#search='terry%20halpin%20object%20role%20modeling'&lt;/A&gt;&lt;/P&gt;&lt;FONT face="Times New Roman" size=4&gt;&lt;P align=left&gt;&lt;STRONG&gt;Object-Role Modeling (ORM/NIAM)&lt;/STRONG&gt;&lt;/P&gt;&lt;P align=left&gt;&lt;FONT size=3&gt;by Terry Halpin&lt;/FONT&gt;&lt;/P&gt;&lt;P align=left&gt;&lt;A href="http://msdn.microsoft.com/library/?url=/library/en-us/dv_vstechart/html/vstchvsea_ormoverview.asp"&gt;&lt;FONT size=3&gt;http://msdn.microsoft.com/library/?url=/library/en-us/dv_vstechart/html/vstchvsea_ormoverview.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P class=dtH1&gt;&lt;A name=vstchvsea_ormoverview&gt;&lt;/A&gt;&lt;FONT size=3&gt;Object Role Modeling: An Overview&lt;/FONT&gt;&lt;/P&gt;&lt;!--NONSCROLLING BANNER END--&gt;&lt;P valign="bottom"&gt;&lt;FONT size=3&gt;Terry HalpinVisual Studio TeamMicrosoft Corporation&lt;/FONT&gt;&lt;/P&gt;&lt;P valign="bottom"&gt;&lt;FONT size=3&gt;November 2001&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 17 Jul 2006 10:49:00 GMT</pubDate><dc:creator>Yelena Varshal</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Great article!&gt;&gt;Function based indexes are something Oracle has had for years, I'd like to see MS do a bit of catching up there.Indexes on calculated fields?I have never use them. What's your opinion?</description><pubDate>Mon, 17 Jul 2006 03:23:00 GMT</pubDate><dc:creator>Alexander Yuryshev</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=3&gt;ORMs DO NOT force your Database to reflect your Domain Model / Object Oriented Application Architecture. It’s quite opposite. They allow you to MAP your normalized relational, Foreign Keyed data to your objects....A table is NOT an object, nor should it be. Relation Data contains a different model than a domain/business model object (Business Logic should be wrapped up in a Domain Model on the Application side or work in conjunction with a solid OO Developed Domain layer that serves application Entities). This is where ORMs come in. They grab your relational data and Map it to your business Entity. So that you can have your backend DB modeled anyway you want. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=3&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=3&gt;While Hibernate or NHibernate do not map to stored procedures, IBatis or IBatis.NET do, which are not “True” (Speaking Purist ORM here) ORMs, but functionally equivalent. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=3&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 12pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=3&gt;Now, if a person is using a code generator, then YES, they are going to try to make their tables Look their Business object so they can auto generate all Business objects and Data Access Layer classes and any Crud SQL...But while this is fast and easy, it is not the right way to go, Which is why I prefer IBatis. Don’t confuse Code Generation with ORM. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;</description><pubDate>Fri, 14 Jul 2006 21:56:00 GMT</pubDate><dc:creator>Shawn-265447</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>I really wish you'd written this article a few months ago.  Our system was performing poorly, and I only stumbled across the "...N'stringValue' queries leading into skipped indexes and tables scans after logging a few days' worth of Profiler entries for reads &gt; 12800 [10M of data]. Thanks for working out the SARG angle, I didn't get that far.Hibernate was quickly disqualified as the stealth "Unicodifier", and we focused on JDBC. A switch was found that, when set, would stop with the Unicode conversions already... but it didn't work as advertised.  We eventually moved over to jTDS, got it configured right, and once it went live our (data) Disk Utilization Percent stopped plateauing at 100% during regular business hours.I don't know all the ins and outs of java connectivity layers, but JDBC seems to be one to avoid just now.   Philip</description><pubDate>Fri, 14 Jul 2006 09:34:00 GMT</pubDate><dc:creator>Philip Kelley</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Great article!  &lt;/P&gt;&lt;P&gt;I've noticed this behaviour as well on one of my production databases :-(&lt;/P&gt;&lt;P&gt;There is a good explanation on MS site: &lt;A href="http://support.microsoft.com/kb/271566/"&gt;http://support.microsoft.com/kb/271566/&lt;/A&gt; and a related article about a fix in SP4. Suppose you can't change the application to insert the correct data type to avoid the table scan, then you can add an index, right? Well, in SP3 and earlier this can lead to incorrect results: &lt;A href="http://support.microsoft.com/default.aspx/kb/899976"&gt;http://support.microsoft.com/default.aspx/kb/899976&lt;/A&gt;&lt;/P&gt;&lt;P&gt;JP&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Fri, 14 Jul 2006 04:59:00 GMT</pubDate><dc:creator>JP de Jong-202059</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Great article</description><pubDate>Thu, 13 Jul 2006 23:42:00 GMT</pubDate><dc:creator>Ian Yates</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Great article, Don!  This is extremely helpful....</description><pubDate>Thu, 13 Jul 2006 14:50:00 GMT</pubDate><dc:creator>Calvin Lawson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Regarding ORM and Hibernate, my company is currently using Hibernate 3.0.x (started with 2.x, soon to upgrade to 3.1.x) with our new Java-based web applications (migrating slowly from VB6 desktop apps).  For simple CRUD (create, read, update, delete) operations, Hibernate makes the developer's job trivially easy to do.  There is no need for developers to write any SQL in these cases.  In fact, they shouldn't ever have to write SQL anymore, although Hibernate has its own query language called HQL that is an object-oriented variation of SQL that is useful to solve some issues.Most of the problems that I've seen arise when you want to use Hibernate to do reporting, or ywhen ou run into performance problems because the developers don't fully understand what Hibernate is doing when it converts their configuration information and Java code into actual SQL.  Hibernate is a lot more complex that it may look on the surface, and there are definitely best-practices that should be used and anti-patterns to avoid.  It is also very flexible, though, and you will find that the developers have actually put a LOT of thought into the features and default behaviors of the tool.Debugging performance issues can be very time-consuming until you have experience doing it, although Hibernate's "show_sql" feature can help a lot (along with profiling on the database).  I highly recommend the "Hibernate in Action" book by Manning Publishing, whether you're a developer or a DBA.  http://www.manning.com/bauer/My company is also practicing agile development methodology (yet another topic for another day), so in addition to using Hibernate, the developers actually "evolve" the database schema as they need to implement features.  (I know, shudders just went through every DBA reading this!)  It's not as bad as it seems, though.  There are definitely some pitfalls that they've run into, but when our DBAs catch them, there has always been a way to fix the problem using the additional features that Hibernate provides.I think a best-practice for us was to have a DBA work with (or even "pair" with) the development team part-time to prevent some of these issues.  Learning to use Hibernate effectively (and efficiently) is definitely more of a journey than a destination for all parties involved.I am interested to hear Don's arguments for using stored procedures since I like the idea of providing abstraction layers to the database (which Hibernate also does, but more from a developer's perspective).Dave</description><pubDate>Thu, 13 Jul 2006 11:15:00 GMT</pubDate><dc:creator>David Kilzer</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Thanks.  Originally we were using the Microsoft JDBC driver.  After this problem was resolved, several developers wanted to try a different driver, I'm not exactly sure which one(s) they tried.  The performance was a little better (about 10%), not much, but enough to decide to do more testing.&lt;/P&gt;&lt;P&gt;I'll check to see which driver they are using.&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 11:06:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>In the article, you never mentioned which JDBC driver you were using, nor which options you were setting on the driver's connection string.  This can make a big difference in performance.If you haven't tried it, I would encourage you to test the jTDS driver with your application, with the sendStringParametersAsUnicode property set to 'false'.  Hibernate makes it trivial to switch JDBC drivers, if only for testing:  http://jtds.sourceforge.net/  http://jtds.sourceforge.net/faq.html#urlFormatNote that the jTDS driver still supports connecting to SQL Server 6.5 or 7 databases, unlike Microsoft's latest JDBC driver.  (DISCLAIMER: I am a contributor to the project.  I implemented the feature that let the driver use named pipes to talk to 6.5 databases that weren't using TCP/IP connections.)Dave</description><pubDate>Thu, 13 Jul 2006 10:59:00 GMT</pubDate><dc:creator>David Kilzer</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Oops.  A bit of an oversight there.  Those two queries are not logically identical.  If you make them &amp;lt;= and &amp;gt;= they are the same.&lt;/P&gt;&lt;P&gt;However, the point I was trying to illustrate still stands.  The first one cannot use an index regardless of the projection list.  The reason it can't use an index is that you are performing a function (conversion of the data into a new form) on the data and the index is not organized according to the function.  &lt;/P&gt;&lt;P&gt;Function based indexes are something Oracle has had for years, I'd like to see MS do a bit of catching up there.&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 10:57:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Good article, but I disagree with the DATEDIFF/DATEADD statement "The first query can't possibly use an index and performs the DATEDIFF on every row in the table." used on the DateOfBirth example.&lt;/P&gt;&lt;P&gt;I believe this is because of the "select *", and not because of the DateDiff/DateAdd differences. (Also as a side note, both return a different amount of rows in my testing so I'd say they are not interchangeable). If you reduce the number of fields needed (maybe down to just CustomerID ) and they are also in an index ( DateOfBirth, CustomerID ), then that index &lt;EM&gt;can&lt;/EM&gt; be used in both types of queries.&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 09:25:00 GMT</pubDate><dc:creator>Rick Harker</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Excellent.&lt;/P&gt;&lt;P&gt;I will even forward a link to this to the folks at Learning tree who developed their high performance DB course, and while they covered SARGs, they did not cover anything like this.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 08:53:00 GMT</pubDate><dc:creator>Brian Munier</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>And probably INTEGER would be mutch faster &lt;img src='images/emotions/wink.gif' height='20' width='20' border='0' title='Wink' align='absmiddle'&gt;  and preferable because you have precision 0.</description><pubDate>Thu, 13 Jul 2006 07:46:00 GMT</pubDate><dc:creator>ALZDBA</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;Nice info to know. Fell foul of the conversion rules with SP4 when trying to use a variable devalred as Decimal(16,0) against a Primary key column defined as Decimal(12,0).&lt;/P&gt;&lt;P&gt;It managed to persuade SQL to do a table scan instead of an Index seek!&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 07:22:00 GMT</pubDate><dc:creator>Paul Smith-221741</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;I have NEVER posted a reply to any article before.  But this one deserves some praise.&lt;/P&gt;&lt;P&gt;I'm a developer and constantly bugging my dba for ways to make my apps runs faster and jump higher.&lt;/P&gt;&lt;P&gt;He has probably already read this article, but I'm going to go sit and show him that developers can be taught if properly beaten...&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 07:14:00 GMT</pubDate><dc:creator>FritzDotNet</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>This was just the article I needed to print out roll up and beat my development team with!  Thanks for the effort!  I am looking forward to your views concerning ORM and Hibernate.  I am not a big fan either.  Currently fighting with the dev group about how they are wanting to use it.</description><pubDate>Thu, 13 Jul 2006 06:13:00 GMT</pubDate><dc:creator>Bob Sellers</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;btw precedence has been changed with sql2000 sp4 &lt;img src='images/emotions/crazy.gif' height='20' width='20' border='0' title='Crazy' align='absmiddle'&gt;&lt;/P&gt;&lt;P&gt;Let's hope they don't do that again &lt;img src='images/emotions/ermm.gif' height='20' width='20' border='0' title='Errmmm...' align='absmiddle'&gt;&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 06:04:00 GMT</pubDate><dc:creator>ALZDBA</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Great article. Thanks for all the work. While I was aware that avoiding implicit converts resulted in better query plans, I didn't know about the data precedence. That's a great piece of information the next time (and there will be one) I have the same issue (read: argument) with a developer who can't seem to understand why the crazy dba's want you to explicitly declare the correct data types in stored procedures instead of using strings for everything (because, after all, strings are eaiser, aren't they? And SQL Server will just implicitly convert them, so I don't have to worry about data types...).</description><pubDate>Thu, 13 Jul 2006 06:00:00 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>&lt;P&gt;add this one to "10 things i wish my developers knew about sql"&lt;/P&gt;&lt;P&gt;Make sure you use the datatype of your columns ! because you avoid your dbms to translate it for you (each and every time again and again)&lt;/P&gt;</description><pubDate>Thu, 13 Jul 2006 04:58:00 GMT</pubDate><dc:creator>ALZDBA</dc:creator></item><item><title>Beware of Search Argument (SARG) Data Types</title><link>http://www.sqlservercentral.com/Forums/Topic290539-132-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF="http://www.sqlservercentral.com/columnists/dpeterson/bewareofsearchargumentsargdatatypes.asp"&gt;http://www.sqlservercentral.com/columnists/dpeterson/bewareofsearchargumentsargdatatypes.asp&lt;/A&gt;</description><pubDate>Tue, 27 Jun 2006 13:17:00 GMT</pubDate><dc:creator>DCPeterson</dc:creator></item></channel></rss>