lapis
lapis copied to clipboard
use prepare/execute with postgres
Postres allows a session to cache prepared statements on server-side. http://www.postgresql.org/docs/9.2/static/sql-prepare.html
A prepared statement is a server-side object that can be used to optimize performance.
This change doesn't affect current Lapis interface. Lapis can detect repeated queries using a template string (e.g., "where tag = ?") as key. After parameters are substituted in templates, it becomes harder to find similar queries. That is why using prepared statements increases performance.