Open asdine opened 5 years ago
@89z Great work
I would like to extend your example to add graphQL: https://github.com/UHN/ggql/tree/master/examples/reflection#define-the-api. This is a new graphql lib that is much faster than others.
With Genji backing it , it will be highly efficient.
Maybe we can make it a genji example too that people can use as a reference.
Just out of curiosity, would interleaving tables as seen in Cloud Spanner be a suitable alternative to joins? While it's not a drop-in replacement for a traditional table join, it could provide additional performance in the form of data locality.
In the context of Cloud Spanner, interleaved tables also allow for better performance in a distributed context. I've seen several requests here for Raft or other HA implementations and while it sounds like that's a "maybe down the road" feature, interleaved tables could solve the future problem of joins between tables distributed across nodes by co-locating tables with each other on the same node.
Got links on this approach by any chance ?
On Sat 8. May 2021 at 21:49, Clark McCauley @.***> wrote:
Just out of curiosity, would interleaving tables https://cloud.google.com/spanner/docs/schema-and-data-model#parent-child_table_relationships as seen in Cloud Spanner be a suitable alternative to joins? While it's not a drop-in replacement for a traditional table join, it could provide additional performance in the form of data locality.
In the context of Cloud Spanner, interleaved tables also allow for better performance in a distributed context. I've seen several requests here for Raft or other HA implementations and while it sounds like that's a "maybe down the road" feature, interleaved tables could solve the future problem of joins between tables distributed across nodes by co-locating tables with each other on the same node.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/genjidb/genji/issues/3#issuecomment-835488249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVPLFDHAXCVLGVGKV2UPITTMWIVJANCNFSM4HI6M3AQ .
-- Mobile: +4915231894553 Telegram: http://t.me/gedw99
Besides the link I cited in my OP, the following links may be helpful.
Sadly, I haven't found much by way of implementation details.
Instead of joins, graph model can be implemented, its faster. Take a look at https://surrealdb.com/docs/surrealql/statements/relate @tdakkota @clarkmcc
Abstract
This proposal is mostly based on #297
Proposal: JOINs
For now, Genji have no ways to select several tables in one query. JOINs is the most commonly used way in relation databases.
Changes
Add SQL JOIN operation parser.
Add a Join operation to the planner and nodes which implementing it. Joining algorithms implemented by #297:
Joining algorithms which not implemented by #297:
A good note about implementing joins from CrateDB blog: https://crate.io/a/joins-faster-part-one/
Add a optimizator rule to determine which algorithm should be used For now, #297 adds a optimizer rule which replaces a Nested loops join to Hash join if clause is a equi-join.
Add a special joined document type which allow to access fields from all joined tables. And there a problem, Genji is not a relational database, document fields can be undeclared in table definition. So any relative field path in query can be ambigous.
Some ideas to solve:
table_name.path_to_field