database
database copied to clipboard
WIP POC for better perf.
Optimize relationship writes with bulk operations.
Adds bulk insert/update methods to avoid N+1 queries when creating relationships. Junction table links now use batch inserts, and one-to-many/many-to-one relationships use SQL UPDATE with IN clauses instead of individual updates. Includes updateManyByIds() adapter method and benchmarks.
Controlled via DB_RELATIONSHIP_BULK_WRITES env var (enabled by default) for before/after tests in benchmarks.