Blog · 3 files
| Name | Tags | Date | Read |
|---|---|---|---|
| October 2026 · 2 posts | |||
| first-row-per-group-sql.md Top-N per group in SQL: matching the query to your data A guide to selecting the first or top-N row per group in SQL Server, PostgreSQL, EF Core and Spark: how each pattern executes, why data distribution decides which one wins, which indexes they need, and how to verify the choice in the plan. Databases | #sql #sql-server #postgresql #performance | 8 min | |
| upsert-sql-server-postgresql-sqlite-guide.md Concurrency-safe upserts in SQL Server, PostgreSQL and SQLite How upserts break under concurrency and how to write them safely: UPDLOCK and SERIALIZABLE or MERGE in SQL Server, ON CONFLICT, MERGE and RETURNING in PostgreSQL, native UPSERT in SQLite, and why INSERT OR REPLACE is not one. Databases | #sql #sql-server #postgresql #sqlite | 7 min | |
| September 2026 · 1 posts | |||
| why-nolock-is-still-wrong.md Beyond NOLOCK: row versioning, RCSI and SQL Server 2025 optimized locking How NOLOCK really behaves (dirty reads, skipped and duplicated rows, error 601), how RCSI and SNAPSHOT isolation replace it, and what SQL Server 2025 optimized locking adds on top, including its limits. Databases | #sql-server #concurrency #performance | 7 min | |