Posts

Showing posts with the label sql optimization

A New Collection of Thoughtful Learning Apps — Now Available on iOS & Android

Image
I’m excited to share a set of mobile apps I’ve recently completed and published on both the Google Play Store and the Apple App Store. These apps are designed with a simple goal in mind: to make meaningful, structured content more accessible, whether you’re studying theology or improving your English vocabulary. 📱 Now Available on Both Platforms All apps are live and available for download: Google Play Developer Page: https://play.google.com/store/apps/dev?id=5835943159853189043 Apple App Store Developer Page: https://apps.apple.com/ca/developer/q-z-l-corp/id1888794100 📖 Theology & Confession Study Apps For those interested in Reformed theology and classical Christian teachings, I’ve developed a series of apps that present foundational texts in a clean, focused reading format: The Belgic Confession Canons of Dort Heidelberg Catechism Westminster Shorter Catechism Each app is designed to provide a distraction-free experience, making it easier to read, reflect, and revisit these im...

How We Made a Spring Boot Pagination Query 36× Faster (1.8 Minutes → 3 Seconds)

Image
How We Optimized a Spring Boot Pagination Query by 36× (From 1.8 Minutes to 3 Seconds) In high-traffic backend systems, slow database queries are often the hidden bottleneck that quietly kills performance. In our case, a paginated query powering a reporting API was taking 1.8 minutes to respond under load. After optimization, we reduced it to ~3 seconds . 36× faster ~97.2% less execution time ~3500% performance improvement Here’s how we did it — and the key lessons you can apply immediately. 🧱 The Problem: Slow Pagination Query We had a Spring Data JPA query backing a paginated API. It involved multiple filters, joins, and was returning a large dataset. Original issues: Full entity loading Heavy object graph hydration Unnecessary columns fetched Inefficient filtering logic Expensive pagination count The database schema (simplified and anonymized) looked like this: TABLE txn_line ( line_id BIGINT, order_id BIGINT, product_code ...

Sprint Design Notes: LDAP (OUD vs AD) and SQL Lookup Optimization

Image
Sprint Design Notes: LDAP (OUD vs AD) and SQL Lookup Optimization Today was a light but productive design session focused on aligning the team on upcoming sprint stories. While the implementation itself is not overly complex, the discussion surfaced two important architectural considerations: How we handle large identifier lookups in SQL queries How we manage LDAP-based authentication and group access control (OUD vs AD) This post documents both topics for future reference and knowledge sharing. SQL Lookup Design: Handling Large Identifier Lists One of the stories requires supporting lookup by identifier list, where the input may contain a comma-separated list of values. The Problem Directly passing a large list of identifiers into SQL introduces several risks: SQL query length limitations (database dependent) Overly large IN (...) clauses Performance degradation on large parameter sets SELECT * FROM orders WHERE identifier IN (...very long list...