Re: Precompiled statement?
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Wed, 23 Apr 2008 21:58:18 -0400
joeNOSPAM@xxxxxxx wrote:
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.
That is what a good database and a good JDBC driver does.
And what the name PreparedStatement clearly indicates is the
intention.
But there are AFAIK no guarantee that this is actually happening.
So one should check what the specific database does before
claiming that prepared statement improves performance.
No need to check before choosing prepared statement, because
there are so many other advantages of using it.
Some years ago I tested Oracle and MySQL. Oracle obviously did
the right thing and prepared statement improved performance
significantly. On MySQL prepared statement reduced performance
(MySQL first introduced PREPARE in version 5.0).
Arne
.
- References:
- Precompiled statement?
- From: Taras_96
- Re: Precompiled statement?
- From: joeNOSPAM@xxxxxxx
- Re: Precompiled statement?
- From: Martin Gregorie
- Re: Precompiled statement?
- From: Taras_96
- Re: Precompiled statement?
- From: joeNOSPAM@xxxxxxx
- Precompiled statement?
- Prev by Date: Re: large queries
- Next by Date: Re: Pooling of connections
- Previous by thread: Re: Precompiled statement?
- Next by thread: The next major event that people utilise dinner suit hire is for black tie events. These are typically things like large birthday parties or charity events. The general term for the dinner suit in America is the Tuxedo and this name has crossed over to usage in English. Other ways in which this style of suit is referred to are semi-formal, black tie and evening dress. The most typical styling that differentiates this type of suite from the conventional suit is the use of a bow tie. The bow tie is the most visible difference between this style of dress and other suits.
- Index(es):
Relevant Pages
|