sql - position of conditional parameters does matter in execution time? -
I have a database table with more than 3.5 million lines, where I am active user ( bit Columns) where the name is in the
first name column ( nvarchar (100)
).
I have not applied over firstname to an index
.
I wrote a question like:
Select * From the table where isActive = 1 and firstname '% ar%' taken Time: ~ 17s
and the second one like this:
Select from the table where the first name '% ar%' and isActive = 1 took the time: ~ 2s
I do not get what's happening behind the curtain. Can you please tell me how does SQL Server 2008 R2 take it?
When implementing such situations, should I keep in mind the other things?
Comments
Post a Comment