Friday, November 16, 2012 10:22 AM
I have a simple join that works, and at the end I have either:
where string == string
this takes about 2 minutes on a database with 44 million records.
If I however search on the int column
where int == int
the query takes seconds? On the same db with the same number of records?
Are there any reasons for this?
Friday, November 16, 2012 5:14 PM
One of the fields could be indexed and the other not.
Saturday, November 17, 2012 1:48 PMBasically it's not about LINQ cause, your where condition is finally translated into SQL Statement and operation is performed in SQL and of course, search by varchar will be slower than int.
Please mark as reply if helped.
Also visit my blog http://msguy.net/