On Mon, 2007-06-25 at 15:11, Dave Cramer wrote:
> I think the text should be specifying that once you exceed
> preparedThreshold executions the driver uses a named prepared
> statement, and can re-use it. Otherwise it uses unnamed prepared
> statements which need to be prepared for each execution.
OK, but I also thought that the value 0 means no reuse at all, i.e. it
should always prepare for each execution... and 1 should mean always
reuse, from the first statement on.
Before I was using prepareThreshold='1', and I was seeing only such
entries in the server log:
duration: 5437.499 ms statement: EXECUTE <unnamed> [PREPARE: SELECT
... ]
Note the <unnamed> in the log entry, it was always there for each
statement.
After setting prepareThreshold='0', I started getting 2 kinds of log
entries, the ones like above, and the likes:
duration: 2200.570 ms statement: EXECUTE C_220047 [PREPARE: SELECT
... ]
Note the C_220047, that's what's changed...
I distinctly remember discussing this issue some time ago on this list,
back then I needed the opposite action, to disable the one-time-prepare
by default... now I just need the opposite, to enable it by default even
for repetitive queries... is that possible ?
Cheers,
Csaba.