Fork me on GitHub
#xtdb
<
2021-12-15
>
Nikolas Pafitis11:12:43

Quick question for XTDB datalog queries, are the limit and offset options applied before or after unification?

refset11:12:49

Hey 🙂 limit & offset are always applied after - you can see the full pipeline sequence of operations here: https://github.com/xtdb/xtdb/blob/afd581b4747f18b1332a470ff94174abc6a25947/core/src/xtdb/query.clj#L1716-L1726 ...in summary: 1. joins 2. aggregations 3. order-by 4. offset 5. limit 6. pull 7. return maps

🙌 1
Steven Deobald18:12:22

@U0105D1EL4B Since we're experimenting with Discourse as a way of exposing Q&A like this in a searchable way (yesterday's weather has proven we're just not disciplined enough to turn every question into a FAQ in the docs ... and even less disciplined about updating the docs properly), I'm going to start pestering people to duplicate their Slack questions in https://discuss.xtdb.com/c/users/5, if they're willing. Feel free to ignore this request, but now it's out there. 🙂