Re: Java SQL interface
- From: "Bjorn Abelli" <bjorn_abelli@xxxxxxxxxxxxxxxxxxxxx>
- Date: 7 Jun 2006 14:09:27 +0200
"lakshmi Ashok" wrote...
Bjorn A wrote:
If the DB even makes use of a query plan, in most cases it's
the DB itself that decides upon that.
So, if I use a java prepared statement, there is no confirmation
that the DB may re-use the query plan?
In this case, its as good as using 'Statement' ??
The above issue I have raise is valid if at all a query plan
cache mechanism is in place in the target DB?
Once again, that depends on the implementation.
If the DB makes use of query (or execution) plans, it will do so regardless
if you're using PreparedStatements or only Statements.
The use of PreparedStatements will though increase the possibility to use
possible extended functionality in the DB, e.g. if it internally makes use
of parameterised statements, etc, which menas that it *could* affect the
execution plans.
It could very well be the case that it uses the PreparedStatement to refine
the execution plan further, as you with a PreparedStatement explicitly
define what parameters that can be exhanged for others in the statement.
But, once again, that depends on the implementation, *both* in the DB and in
the PreparedStatement as such. There is no "general rule" for that. The only
thing you can be sure of is what the "contract" for PreparedStatement says:
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/PreparedStatement.html
/// Bjorn A
Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php
.
- Follow-Ups:
- Re: Java SQL interface
- From: lakshmi Ashok
- Re: Java SQL interface
- References:
- Java SQL interface
- From: lakshmi Ashok
- Re: Java SQL interface
- From: Arto Viitanen
- Re: Java SQL interface
- From: lakshmi Ashok
- Re: Java SQL interface
- From: Bjorn Abelli
- Re: Java SQL interface
- From: lakshmi Ashok
- Java SQL interface
- Prev by Date: Re: Java SQL interface
- Next by Date: Re: Java SQL interface
- Previous by thread: Re: Java SQL interface
- Next by thread: Re: Java SQL interface
- Index(es):
Relevant Pages
|