Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #13

Re: Precompiled statement

From joeNOSPAM@BEA.com.remove-dii-this
Subject Re: Precompiled statement
Message-ID <c2b84966-50ba-48c9-bf3f-bc052b822ee5@c19g2000prf.googlegroups.com> (permalink)
Newsgroups comp.lang.java.databases
References <bab2020e-3013-4f07-84fb-f87865c52046@l42g20
Date 2011-04-27 15:21 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.databases
On Apr 22, 11:46 pm, Taras_96 <taras...@gmail.com> 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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.databases | Previous | NextNext in thread | Find similar


Thread

Re: Precompiled statement joeNOSPAM@BEA.com.remove-dii-this - 2011-04-27 15:21 +0000
  Re: Precompiled statement "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000

csiph-web