ko_pivot
10 hours ago
As an Ent user, I’m surprised to see that as the default ORM. It is graph oriented for better and for worse. No composite primary keys for ‘nodes’ and minimal use of joins (no use?) in the underlying generated SQL. The DX is great, but GORM is a better default IMO.
Nonetheless, great to see a new serious Go meta framework.
endigma
7 hours ago
Ent heavily uses joins and does support multi field indices, you should read up on the docs. You can show the queries it’s running using a debug client.
It’s not a Graph DB under the hood and uses any normal relational db quite normally beneath the DX
ko_pivot
4 hours ago
> Ent heavily uses joins
I’m specifically talking about this: https://github.com/ent/ent/issues/977.
Devs assume that the `With` methods are adding join clauses but that is not typically the case.
> does support multi field indices
Composite primary keys are useful for reasons other than unique constraints and query speed. For example, CockroachDB uses the primary key to partition rows. Also, at scale, an extra multi-column index in addition to the primary key when the primary key alone could have sufficed can be a meaningful performance degradation.
> not a Graph DB under the hood
No it is not, but because it has a graph ‘mindset’ and does support Gremlin, traditional SQL folks expecting a lightweight ORM (such as Drizzle in the JS world) may not have a good time.