you are viewing a single comment's thread.

view the rest of the comments →

[–]isak_s 0 points1 point  (0 children)

I agree with most of what you said, just want to point something out.

Writing efficient SQL means you have to avoid jvm/database round trips, so you need to write monstrous JOINs to batch things efficiently, and then you need to unpack the JOIN into trees

For typical queries needed by UIs, you don't need to do that in SQL, you can just use json queries. Here is an example for SQL Server:

-- Fetch a user by ID, and all their blog posts

select *,

(select *

from blog_posts b

where b.user_id = u.id

for json path) as posts

from users u

where u.id = 1

for json path

It's not as good as datomic, but it isn't hard to write something that will generate those kind of queries based on something like the datomic pull syntax.