lapis icon indicating copy to clipboard operation
lapis copied to clipboard

use prepare/execute with postgres

Open starius opened this issue 10 years ago • 0 comments

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.

starius avatar Apr 14 '16 22:04 starius