Schedule - pgDay Paris 2020

Designing Queries for Programs

Date: 2020-03-26
Time: 10:20–11:05
Room: Auditorium

When accessing a database from within a program, most developers test interactively their queries, replace values with bind variables, then paste the query into their program, binding input to the query before executing it; this is usually presented as the correct way of proceeding. In fact, you can often do better. In the same way that a batch program should never be the OLTP queries in a loop, there are some strategies for designing queries for programs, especially dynamic queries with wildly varying criteria. This talk presents a few classic problems, explains issues, and focuses on design patterns that combine maintainability and stable performance.


Stéphane Faroult