AllowPreparedStatement
Prepares (compiles) a query statement before it is executed.
Data Type
bool
Default Value
true
Remarks
If True, Lakebase compiles every query statement before it is executed. If you are executing the same query repeatedly, leaving AllowPreparedStatement set to True should improve performance, since preparing the query avoids recompiling the same query over and over. However, prepared statements also require the driver to keep the connection active and open while the statement is prepared.
If AllowPreparedStatement is set to False, statements are parsed each time they are executed. This can be useful if you are executing many different queries only once.