Home Forums SQL Server 2008 T-SQL (SS2K8) Query seems to be constrained by single core CPU in multiple core server - any suggestions? RE: Query seems to be constrained by single core CPU in multiple core server - any suggestions?

  • Actually, looks like SUBSTRING (LEFT) can be sargable now. Check what is compiled to. Exactly the same as NOT LIKE would:

    "substring([Companies].[dbo].[SourceTable].[CompanyIdentifier] as [a].[CompanyIdentifier],(1),(5))<'EXCLU' AND

    substring([Companies].[dbo].[SourceTable].[CompanyIdentifier] as [a].[CompanyIdentifier],(1),(5))>'EXCLU'"

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]