How lazy is qseq?

Does it:

  • Determine all entity ids immediately, then lazily pull?
    Or,
  • Execute queries incrementally, without realizing intermediate sets at all?
1 Like

Hi @courajs

I’ll point you to a couple of choice quotes from our docs on qseq and confirm for you that your first assumption is correct. Qseq determines all entity ids immediately, then lazily pulls.

https://docs.datomic.com/cloud/query/query-executing.html#qseq

Item transformations such as ‘pull’ are deferred until the seq is consumed

And

qseq is a variant of q that pulls and xforms lazily as you consume

Thanks,
Jaret

1 Like