Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Precompiled...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 10 Topic 3720 of 3800
Post > Topic >>

Re: Precompiled statement?

by =?ISO-8859-1?Q?Arne_Vajh=F8j?= <arne@[EMAIL PROTECTED] > Apr 23, 2008 at 09:58 PM

joeNOSPAM@[EMAIL PROTECTED]
 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
 




 10 Posts in Topic:
Precompiled statement?
Taras_96 <taras.di@[EM  2008-04-22 09:13:57 
Re: Precompiled statement?
Donkey Hot <spam@[EMAI  2008-04-22 18:19:51 
Re: Precompiled statement?
"joeNOSPAM@[EMAIL PR  2008-04-22 12:26:07 
Re: Precompiled statement?
David Harper <devnull@  2008-04-22 20:35:39 
Re: Precompiled statement?
Lew <lew@[EMAIL PROTEC  2008-04-22 21:40:31 
Re: Precompiled statement?
Martin Gregorie <marti  2008-04-22 22:16:24 
Re: Precompiled statement?
Taras_96 <taras.di@[EM  2008-04-22 23:46:26 
Re: Precompiled statement?
"joeNOSPAM@[EMAIL PR  2008-04-23 07:33:08 
Re: Precompiled statement?
=?ISO-8859-1?Q?Arne_Vajh=  2008-04-23 21:58:18 
Re: Precompiled statement?
Taras_96 <taras.di@[EM  2008-04-23 07:58:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:17:17 CDT 2008.