Taming Your Query Latency
summary
Query P90 falls from about 1.6s to ~200ms by combining practical fixes: use the profile API and phases= query|fetch to find hotspots, remove redundant filters (14% gain), fix a stray function_score wrapper (35% gain), simplify tenant match to enable track_total_hits optimization (51% in a simple case), split recall with multisearch (10%), use index sorting to collocate tenants (overhead down from 61% to ~20%), and enable concurrent segment search where possible (ideal ~50%).
AI-written summary · about
chapters (10)
- 0:00Query latency challenges
- 6:06Data placement strategies
- 11:11Track total hits optimization
- 14:19Boolean query performance
- 17:52Permission filtering case study
- 23:58Joins and denormalization
- 26:09Parallelism for faster queries
- 29:20Additional optimization techniques
- 32:29Final results and rollout
- 33:32Q&A
related talks
31mThe 8-Second Nightmare: How One Change Reduced Latency by 99.9%
31m"Optimizing SQL Queries"
41mMySQL Query Optimization Best Practices and Indexing
38mAccelerating Query Performance in CrateDB
50mImproving Postgres' Efficiency
41mTips and Tricks to Scale Elasticsearch for 1M RPMs and Beyond
42mTips & Tricks to Keep Your Queries under 100ms with ClickHouse®
17mMastering the Query Insights Dashboard in OpenSearch
