Fork me on GitHub
#pathom
<
2020-07-16
>
daniel.spaniel17:07:05

anyone know any tricks for doing pagination with datomic with pathom ( would like to do filtering and sorting too ) if i have to do in memory i can .. but its painful

wilkerlucio19:07:46

the problem here is how to paginate datomic, they dont have a good solution, I spent a good time trying to get that to be efficient, but no good, the best I could do was paginate by date ranges, this way you can constrain space and make it usable (but has the trade-offs from date pagination, for example, the number of items for different date ranges may change dramatically)

daniel.spaniel15:07:13

thanks wilker .. will ponder some more then ..

Joe R. Smith23:07:54

If you're running your code on Datomic Cloud Ions or a Peer server doing the sort/pagination in memory is pretty close to order by/limit in SQL- it's happening in the database process. Consider using range queries, where possible. There's also a new index-pull API you should check out: https://docs.datomic.com/cloud/query/query-index-pull.html

daniel.spaniel00:07:18

thanks @U087E7EJW good tips

👍 3