~/talk

Modern SQL features in PostgreSQL

Talkat PGConf India 2025 · 2025-03-05..03-07· [databases]
links:none on file
slides:none on file

PGBench shows tiny network delays crush throughput — 0.01 ms yields ~60,000 TPS, 0.28 ms drops to ~35,000 and 0.48 ms to ~2,000 — so reducing round trips is the biggest win. Uses include replacing chatty app logic with single SQL statements, measuring via pgbench and lock timing, cutting rollback storms (examples report ~95,000 aborts/day and terabytes of temp files). Practical fixes demonstrated: CTE to turn hours into minutes, ON CONFLICT and temporary statement locks to avoid rollbacks, and MERGE plus FDW for intermittent replication.

AI-written summary · about

  1. 0:00Introduction to modern SQL
  2. 1:06Why learn modern SQL
  3. 2:10Network latency impact on performance
  4. 9:45Poor SQL practices and issues
  5. 18:29Modern SQL features overview
  6. 23:40Sequences vs business logic for IDs
  7. 29:43Handling conflicts and rollbacks
  8. 33:41Merge statement benefits
  9. 37:01Data replication with MERGE
  10. 38:49Unnest for array conversion
  11. 40:12Complex business logic in SQL
  12. 42:42Data retention and archiving
  13. 45:12Atomicity in SQL statements
  14. 46:15Optimizing database performance
  15. 47:00Conclusion and resources
~/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.