Tagged articles

N+1 query

9 articles · Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 21, 2026 · Backend Development

Why Your API Slows Down: 8 Critical Bottlenecks in Spring Boot Performance

This article analyzes eight common API performance bottlenecks in Spring Boot applications, including N+1 queries, improper entity returns, missing indexes, JOIN FETCH pagination issues, in-memory filtering, deep pagination, long transactions, and caching strategies, with code examples and optimization techniques for each.

API performanceDTO projectionJOIN FETCH
0 likes · 14 min read
Why Your API Slows Down: 8 Critical Bottlenecks in Spring Boot Performance
Xiaolin Talks Programming
Xiaolin Talks Programming
Jul 14, 2026 · Backend Development

ORM Performance Tuning in Spring Boot: Fixing N+1 Queries, Dynamic SQL Optimization & Fetch Strategies

This guide covers root-cause analysis of N+1 queries in JPA and MyBatis, APM-based detection methods, fetch strategy optimization using EntityGraph and JOIN FETCH, MyBatis resultMap refactoring, lazy-loading boundaries, second-level cache trade-offs, keyset pagination, and production-grade SQL interceptors with code review checklists.

Fetch StrategyJPAMyBatis
0 likes · 21 min read
ORM Performance Tuning in Spring Boot: Fixing N+1 Queries, Dynamic SQL Optimization & Fetch Strategies
dbaplus Community
dbaplus Community
Jun 21, 2026 · Databases

Why the 20‑Year‑Old N+1 Query Problem Doesn’t Apply to SQLite

The article explains that the classic N+1 query anti‑pattern, harmful on client‑server databases like MySQL, is irrelevant for SQLite because its embedded architecture eliminates network round‑trips, turning hundreds of queries into cheap function calls, and examines the performance data and trade‑offs behind this claim.

FossilN+1 queryQuery Optimization
0 likes · 29 min read
Why the 20‑Year‑Old N+1 Query Problem Doesn’t Apply to SQLite
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 18, 2026 · Backend Development

Avoid Hidden Performance Landmines: 7 Common Spring Boot Production Pitfalls

The article identifies seven common performance killers in Spring Boot production—N+1 queries, unbounded thread pools, excessive logging, oversized response bodies, missing indexes, synchronous external API calls, and serial API invocations—and provides concrete code‑level solutions such as eager fetching, custom thread pools, lazy logging, DTOs, index creation, timeout configuration, and CompletableFuture parallelism.

CompletableFutureDTON+1 query
0 likes · 10 min read
Avoid Hidden Performance Landmines: 7 Common Spring Boot Production Pitfalls
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.

HibernateJPAN+1 query
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.

Batch OperationsEager LoadingN+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