|
|
|
|
|
by Clever321
874 days ago
|
|
Datalog feels so much more intuitive than SQL or any other query language I've used. I'm able to write concise, complex expressions pretty easily. In a SQL-based system, there seems to be a (low) complexity metric where it's easier to write/debug/maintain what was supposed to be a 'declarative' SQL query in a functional/imperative language instead. It feels like datalog is the next evolution of a declarative query language, one that is much more declarative than SQL itself. In the "day of datomic" videos, there is a segment where Stu debugs a slow query. He does the debugging without even looking at the data model, only by rearranging the clauses. It is really, really impressive, and I can't imagine having that capability in SQL. |
|
However, they made an explicit design decision to not include a query optimizer and execute the clauses as they were written. This is usually fine since the author has some idea of what the best order is, but there are O(2^k) different permutations of clauses so doing it by hand will fail at some point (if you want the optimal ordering).