Does RavenDB provide internal query-by-id query optimization?

When executing a dynamic query, RavenDB usually creates a temp index.

Retrieving a document using Id does not cause this behavior:

 var entity = documentSession.Query<Entity>().Single(x => x.Id == 1); 

Does RavenDB have built-in optimization for this type of query?

+6
source share
2 answers

Arnold, No, this does not optimize this behavior.

+4
source

Your guess is wrong because it will create a temp index. If in your example its name should be "Temp / Entities / By__document_id"

+1
source

Source: https://habr.com/ru/post/907188/


All Articles