Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234

Beware of Search Argument (SARG) Data Types Expand / Collapse
Author
Message
Posted Friday, July 13, 2007 6:51 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, February 9, 2009 7:44 PM
Points: 282, Visits: 37
Great article.  Very informative.
Post #381447
Posted Friday, July 13, 2007 8:10 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, January 11, 2013 12:30 PM
Points: 21, Visits: 344

Great Stuff

Thanks

Post #381485
Posted Tuesday, November 30, 2010 7:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, November 30, 2010 7:37 PM
Points: 1, Visits: 4
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
Post #1028359
Posted Saturday, December 4, 2010 9:54 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 4:53 PM
Points: 36,795, Visits: 31,257
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.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1030284
Posted Sunday, December 5, 2010 1:27 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:13 PM
Points: 6,175, Visits: 7,254
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.



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1030348
Posted Sunday, December 5, 2010 12:30 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410
Thanks, and your're welcome. I'm glad to know that the article was useful.



/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
Post #1030382
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse