Re: Prepared Statement
- From: "lakshmi Ashok" <lakshmi2510@xxxxxxxxx>
- Date: 6 Jun 2006 22:26:54 -0700
I could not quite understand your concern ;-) but let me try..
A query plan is generated each time a query needs to be executed. What
we do with a prepared stmt is to prevent generation of this query plan
each time.
The query plan is placed in the cache of the database for some time
which is configured by the DBA.
When your code opens a connection, and tries to execute the stmt, it
first searched in the cache for the statement and if it finds it ,
executes it...and gets data from the database.
A pointer to a result set will not exist if you close the connection
itself. Hence, the actual result set could be somewhere on the DB cache
and the interface Result set could be just a pointer to that memory
..... this is a part I am also little bit confused about
.
- Follow-Ups:
- Re: Prepared Statement
- From: Bjorn Abelli
- Re: Prepared Statement
- References:
- Prepared Statement
- From: lsrinu
- Prepared Statement
- Prev by Date: Re: Scrolling large dataset
- Next by Date: Java SQL interface
- Previous by thread: Prepared Statement
- Next by thread: Re: Prepared Statement
- Index(es):
Relevant Pages
|