> "Matveyenko, Wade" wrote: > > In addition, PreparedStatement versus Statement depends on your database and > driver. In the case of Oracle, this reference > http://www.onjava.com/lpt/a//onjava/excerpt/oraclejdbc_19/index.html states > that a you have to do at least 65 iterations of a PreparedStatement to > overcome the initial overhead and make it more performant than a Statement.
In terms of execution speed, that may be correct. However, with Oracle, there is also the memory advantage. An SQL PreparedStatement (with placeholders) executed 50 times (setting the placeholders with 50 different parameter values) will take up memory for one SQL statement. The equivalent SQL Statement (no placeholders) executed 50 times (literal data statically embedded into the SQL) will take up memory for 50 statements. To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
