Architecture Digest
Architecture Digest
Mar 19, 2026 · Backend Development

Why Open Session in View (OSIV) Can Kill Your Spring Boot Performance

Spring Boot’s default Open Session in View (OSIV) keeps Hibernate sessions open throughout the request, silently triggering lazy‑loaded queries during JSON serialization, leading to N+1 problems and massive DB load under load, but disabling it and using explicit fetch joins restores performance.

HibernateN+1 QueryOSIV
0 likes · 7 min read
Why Open Session in View (OSIV) Can Kill Your Spring Boot Performance
macrozheng
macrozheng
Oct 16, 2025 · Backend Development

How to Turn a 3‑Second Category Tree into 30 ms: A Real‑World Backend Optimization

This article analyzes a severe N+1 query performance disaster in a Java Spring Boot project, explains why the traditional recursive approach is slow, and presents a production‑tested solution that reduces database calls to one, uses O(n) tree construction, and adds multi‑level caching to achieve a 100‑fold speedup.

Java BackendN+1 QueryPerformance optimization
0 likes · 24 min read
How to Turn a 3‑Second Category Tree into 30 ms: A Real‑World Backend Optimization
php Courses
php Courses
Sep 15, 2025 · Databases

Eliminate the N+1 Query Anti‑Pattern: Strategies to Boost Database Performance

This article explains why executing many small database queries in a short time harms performance, shows how to detect the N+1 problem with monitoring and logs, and presents refactoring techniques such as eager loading, batch operations, aggregation, caching, and hand‑crafted SQL to dramatically improve speed, scalability, and code quality.

CachingDatabase PerformanceN+1 Query
0 likes · 9 min read
Eliminate the N+1 Query Anti‑Pattern: Strategies to Boost Database Performance
Senior Brother's Insights
Senior Brother's Insights
Sep 11, 2025 · Databases

How to Eliminate the N+1 Query Problem with JOINs in SQLite

This article explains the N+1 query performance issue, demonstrates a naïve Python/SQLite implementation that triggers N+1 queries, compares its runtime, and then shows how using SQL JOINs, GROUP BY, and nested data structures can dramatically improve query efficiency and reduce latency.

JOINN+1 QuerySQL
0 likes · 9 min read
How to Eliminate the N+1 Query Problem with JOINs in SQLite