this post was submitted on 29 Mar 2024
14 points (88.9% liked)
SQL
473 readers
1 users here now
Related Fediverse communities:
- #sql on Mastodon
- #postgresql on Mastodon
- c/PostgreSQL on programming.dev
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The classic example is the N+1 query pattern, where the number of generated queries is linear in the number of rows returned by the first query.
This is not a problem for a modern ORM, JOINs are supported by most ORMs I've worked with for many years.
This will get all the cars and their associated wheels in 1 single query by performing a JOIN operation using Entity Framework Core, assuming there's a FK for Wheel to Car.