Tag
sql
4 articles tagged with “sql”
EF Core 9 in Production: Tracking, Projections, and the Performance Levers That Matter
Bulk updates with ExecuteUpdateAsync, projection over Include, AsSplitQuery for cartesian explosion, auto-compiled models, and IDbContextFactory for parallel work.
SQL Patterns: Joins, Window Functions, MERGE, and Killing N+1
N+1 to JOIN/LATERAL, EXISTS vs IN vs JOIN, ROW_NUMBER/RANK/SUM OVER, ANSI MERGE in PG 15+, ON CONFLICT upsert, Dapper parameterization, EXPLAIN read guide, NULL semantics + OR-defeats-index pitfalls.
Schema Design: Keys, Relationships, Tenancy, and Audit
Surrogate (UUIDv7/bigint) vs natural keys, foreign keys + CHECK constraints, audit columns + history triggers, soft delete with partial indexes, multi-tenancy patterns + Postgres RLS, junction tables for N:N.
Normalization: 1NF to 3NF, Denormalize Reads, Snapshot Truths
1NF/2NF/3NF/BCNF in plain English, when to denormalize via materialized views or CQRS read models, snapshots vs duplication, REFRESH MATERIALIZED VIEW CONCURRENTLY, propagating changes via CDC.

