[CSHARP-1149] Performance difference between Query.Where and Query.EQ Created: 14/Dec/14  Updated: 05/Apr/19  Resolved: 04/Apr/15

Status: Closed
Project: C# Driver
Component/s: Performance
Affects Version/s: 1.9.1
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Eitam Belahousky Assignee: Unassigned
Resolution: Done Votes: 0
Labels: driver, performance, question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows



 Description   

Hi,

I am performing many update operations and I see a performance impact when using Query.Where instead of Query.EQ.
The queries are:

Query<SomeObject>.Where(x => x.Id == someId)
Query<SomeObject>.EQ(x => x.Id, someId)

Creating 10000 queries takes 115ms when using the EQ query and 4500ms when using the Where query.

Why is there a difference between the two? Could you explain what the difference is?

Thanks,
Eitam



 Comments   
Comment by Craig Wilson [ 14/Dec/14 ]

There shouldn't be much of a difference at all, especially that noticeable. Perhaps the code you are using to benchmark this would be helpful so we can attempt a repro.

Craig

Generated at Wed Feb 07 21:38:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.