This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
Closed
Description
Calling explain on a query containing a hint removes that hint, making it harder to evaluate multiple possible query strategies.
q = User.where(email: "abc").hint(email: 1).query
q.operation.selector
=> {"$query"=>{"email"=>"abc"}, "$hint"=>{"email"=>1}}
q.explain
q.operation.selector
=> {"$query"=>{"email"=>"abc"}, "$orderby"=>{}, "$explain"=>true, "$limit"=>-1}
IMO, the hint should be kept.
Metadata
Assignees
Labels
No labels