PreparedStatement
is a precompiled
statement so it will increase jdbc performance at runtime but still confused about
The following steps are used by any database while running an SQL query:
In case of Statement interface all above 6 steps need to be followed for each query execution. However, in case of PreparedStatement interface steps 1 to 4 will be done only once and steps 5 & 6 will be repeated for each execution of the query. This makes the PreparedStatement faster.
Hope this answers your question...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With