Re: Precompiled statement?
- From: "joeNOSPAM@xxxxxxx" <joe.weinstein@xxxxxxxxx>
- Date: Wed, 23 Apr 2008 07:33:08 -0700 (PDT)
On Apr 22, 11:46 pm, Taras_96 <taras...@xxxxxxxxx> wrote:
I think my original question may have been unclear.
What is actually being done when a SQL statement is being 'compiled'?
Query plan? Parsing of SQL statement? Something else?
Thanks
Taras
The driver sends the SQL string to the DBMS. The DBMS parses it, and
compiles/creates a plan for executing what the SQL wants. This
includes
verifying the names of tables and columns etc, choosing what index to
use etc. This plan may include place-holders for data values passed in
as parameters. This is very similar to a session-scoped stored
procedure.
Then, when the driver sends the needed parameter values, and says
'go',
the DBMS executes the plan. A plain statement does the same, all in
one call,
except the DBMS doesn't retain the plan, so even an immediate repeat
of
the exact same query requires the DBMS to re-parse, re-check, and re-
plan,
and re-execute.
Joe Weinstein at BEA Systems
.
- Follow-Ups:
- Re: Precompiled statement?
- From: Arne Vajhøj
- Re: Precompiled statement?
- From: Taras_96
- Re: Precompiled statement?
- References:
- Precompiled statement?
- From: Taras_96
- Re: Precompiled statement?
- From: joeNOSPAM@xxxxxxx
- Re: Precompiled statement?
- From: Martin Gregorie
- Re: Precompiled statement?
- From: Taras_96
- Precompiled statement?
- Prev by Date: Pooling of connections
- Next by Date: Re: Pooling of connections
- Previous by thread: Re: Precompiled statement?
- Next by thread: Re: Precompiled statement?
- Index(es):
Relevant Pages
|
|