~/talk

Batch select, coroutines and a million RPS

TalkinRussianat Joker 2023 · 2023-10-09..10-14· [kotlin, databases]
links:none on file
slides:none on file

The talk examines techniques for performing batch SELECTs against relational databases (PostgreSQL used in examples) to achieve large throughput gains similar to JDBC batch updates/inserts. It shows several batch-select approaches, measures the performance improvements, and demonstrates how Kotlin coroutines can let you write per-entity processing code while under the hood executing batched database operations; the same ideas apply to Java with async frameworks and other relational DBs.

AI-written summary · about

  1. 0:00Introduction
  2. 1:29Talk goals
  3. 3:14Why Kotlin and DSL
  4. 4:59Billions of selects problem
  5. 7:12Standard select approach
  6. 7:34JDBC performance without optimizations
  7. 10:00Batch select and its benefits
  8. 11:46Batch select issues in real projects
  9. 12:07JDBC query cache mechanism
  10. 15:42Query cache limitations
  11. 17:28Different query plan problems
  12. 18:11Select performance with parameter list
  13. 20:40preparedThreshold in JDBC
  14. 21:44Optimal SQL for batch select
  15. 22:27PostgreSQL unnest and generate_series
  16. 24:14Batch select optimization results
  17. 25:18Coroutine-based request batching
  18. 26:46Task distribution issues
  19. 28:12Optimal task wait strategy
  20. 29:14Live coroutine counter for optimization
  21. 30:59Loop switching: clients and rules
  22. 32:43Optimal coroutine count
  23. 33:48Coroutine context for batch management
  24. 35:57batchProcess method logic
  25. 36:41Final results and performance
  26. 37:26Conclusion
  27. 38:07Q&A: Open Source
  28. 38:28Q&A: R2DBC vs JDBC
  29. 39:16Q&A: RPS and CPU load
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.