prakash.kumar3669 (1/17/2013)
GilaMonster (1/17/2013)
Index on (IsDeleted, SubmitDate DESC) include (ProdName,Category,TotalStock,Price)What would be the exact sql query to create the index.
Why don't you open up books online and read over Create Index.
btw, that's a rather odd predicate on the date column...
how can you ellaborate ?
SubmitDate>=' ' and SubmitDate<' '
There is no possible way that any date can be both greater than or equal to '' and less than ''. Let me rephrase that into numbers...
WHERE SomeNumber >=0 AND SomeNumber < 0
That's completely, logically impossible as it is only true for a number that's both positive and negative at the same time, which no number is.
Either you mis-typed when you copied the query over, or there's some serious flawed logic at work.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability