Patent attributes
Systems and techniques are disclosed for multiplexing database connections with a database proxy, in association with prepared statements. When a client sends initial messages, via a client connection, that set up a prepared statement with a database, the database proxy stores corresponding prepared statement setup data in state data associated with the client connection. When the client sends subsequent messages via the client connection that invoke the prepared statement, the database proxy selects a database connection to use to forward the subsequent messages to the database. The database proxy uses the stored prepared statement setup data to select a database connection that the database already associates with the prepared statement, or to inject prepared statement setup messages that cause the database to set up the prepared statement with the selected database connection.