Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #21
| From | "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Precompiled statement |
| Message-ID | <480fe930$0$90267$14726298@news.sunsite.dk> (permalink) |
| Newsgroups | comp.lang.java.databases |
| References | <c2b84966-50ba-48c9-bf3f-bc052b822ee5@c19g2000prf.googlegroups.com> |
| Date | 2011-04-27 15:21 +0000 |
| Organization | TDS.net |
To: comp.lang.java.databases joeNOSPAM@BEA.com 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 --- * 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 | Next — Previous in thread | Find similar
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