Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
6 posts found #performans
Dapper Performance: Query Cache, GetRowParser and Bulk Alternatives with SqlBulkCopy and COPY
Database PART 15

Dapper Performance: Query Cache, GetRowParser and Bulk Alternatives with SqlBulkCopy and COPY

What Dapper's query cache holds and why it draws a saw blade, when CommandFlags.NoCache is needed, choosing a type per row with GetRowParser, and for the bulk operations Dapper lacks: a transaction on SQLite, SqlBulkCopy on SQL Server and COPY on PostgreSQL, all with real measurements, closing with BenchmarkDotNet.

6 Nov 2026 11 min 12
Dapper and SQL Server: TVPs, ANSI Strings, {=literal} and Parameter Sniffing
Database PART 13

Dapper and SQL Server: TVPs, ANSI Strings, {=literal} and Parameter Sniffing

Queries that return the right result but scan the whole index: the implicit conversion nvarchar parameters cause on varchar columns, Dapper's 4000-character rule, IN lists multiplying plans, table-valued parameters, filtered indexes with {=literal} and parameter sniffing, all with real logical-reads measurements.

6 Nov 2026 11 min 17
Buffered and Unbuffered Reads in Dapper: Streaming Large Result Sets
Database PART 10

Buffered and Unbuffered Reads in Dapper: Streaming Large Result Sets

We measure the difference between buffered and unbuffered reads in Dapper: an unbuffered result re-running the query on every enumeration, 191 MB versus near-zero memory on a million rows, IAsyncEnumerable streaming with QueryUnbufferedAsync, cancellation with WithCancellation and the disposed-connection trap, all with real output.

6 Nov 2026 9 min 9
EF Core Performance Basics: N+1, Projection, AsNoTracking and Compiled Queries
Database PART 17

EF Core Performance Basics: N+1, Projection, AsNoTracking and Compiled Queries

We catch N+1 queries by counting commands, switch to DTO projections, measure the effect of tracking, indexes, split queries and compiled queries on SQLite, and monitor queries with TagWith and LogTo.

5 Nov 2026 9 min 21
Change Tracking in EF Core: Entity States, AsNoTracking and Identity Resolution
Database PART 11

Change Tracking in EF Core: Entity States, AsNoTracking and Identity Resolution

We open up EF Core's change tracker: the five entity states, ChangeTracker.Entries and DebugView, the one-object-per-row rule (identity resolution), AsNoTracking vs AsNoTrackingWithIdentityResolution, when DetectChanges runs, and the 'already being tracked' error.

5 Nov 2026 10 min 21
LINQ Queries with EF Core: SQL Translation, Client Evaluation and the IQueryable Trap
Database PART 09

LINQ Queries with EF Core: SQL Translation, Client Evaluation and the IQueryable Trap

We follow how an EF Core LINQ query becomes SQL: deferred execution, ToQueryString and LogTo, filtering, sorting and paging, projection, First/Single/Find, client evaluation allowed in the final Select, and the IEnumerable trap that silently pulls the whole table.

5 Nov 2026 12 min 15
Blog Map