Hi,
you could indeed use the prepare from a connection and cache the
result yourself.
If you don't use it and enable setCachePreparedStatement, then
internally the client maintains a cache of prepared statement that is
equivalent to caching the prepared statement yourself.
The code you shown is equivalent only if the statement is cached until
it is evicted from the cache because it is full and the statement is
not used anymore (it's an LRU policy).
The benefit of preparing yourself a statement is to ensure that the
statement is valid from the database perspective, i.e when you have a
result from prepare then you are sure the prepared query is valid.
HTH
Julien
> --
> You received this message because you are subscribed to the Google Groups "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
vertx+un...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/vertx/CAJSoigtbXuFF_1EckCOezgPwjYFEmmHufLEzczv8poppPF7Pug%40mail.gmail.com.