Thanks Noel. String values are exactly what we where planning to keep as 
parameters.

So in many cases one or more parameters will remain (for string values) but 
most will be replaced by literals since in our case by far most column 
types are numeric, timestamp or UUID.

I was hoping for perhaps some speedup if the query planner could make a 
more optimal query plan based on known values in the SQL string as opposed 
to a more generic query plan that would have to take all possible values 
for one or more parameters into account. If that would never be the case in 
H2 then there is little to no advantage for us in changing anything.

On Monday, 7 November 2022 at 13:28:07 UTC+1 Noel Grandin wrote:

> I prefer PreparedStatement purely so I can avoid thinking about escaping 
> string values.
>
> But if that doesn't worry you, then there is no down side to using 
> Statement for execute only once.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/1bc0addc-df72-42be-bef4-125a817c20d8n%40googlegroups.com.

Reply via email to