mongoDB run queries just like as SQL !!!
var x = nosql.GetRecords<Event>(p => p._Data == "rawhix", 0, 12222); // ICursor<T> GetRecords<T>(expression, skip, limit);
SqlDataReader dr = SqlHelper.ExecuteReader("Select Top(12222)* From NewsFeed WHERE _Data = 'dddd'");
the MongoDB contains 1000000 record which are the same in the SQL .
the data stored as the following :
Id = 1 , _Data = 1abc Id = 2 , _Data = 2bc ... etc
Event class :
Class Event => int Id => string _Data
when I run the code the result is :
Mongo : 580ms
SQL : 102ms
Should I do anything to fix this !! because the mongo was always faster except this test !?!