Re: Difference between Statement and preparedStatement (for SQL databases) ?

From: Bryan Cooper (cooperbry_at_yahoo.com)
Date: 10/16/04


Date: Sat, 16 Oct 2004 11:34:32 -0400

Statement is parsed by the database at runtime everytime (It's dynamic query
resolution). Prepared statements (depending on your database) are parsed
once (optimized by the database once) and reused.

Hope that helps.
Bryan Cooper

"Ken Philips" <kennyb@yahoo.ca> wrote in message
news:ckqvcr$kbm$05$1@news.t-online.com...
> Sometimes I can see pure Statement declaration for accessing SQL databases
> others use preparedStatements.
>
> What is the difference?
>
> Ken
>



Relevant Pages

  • Re: Prepared statement
    ... you are misusing prepared statements. ... you should build them in String variables instead of trying to abuse ... something VERY seriously wrong with your database schema. ... advocate, then advocate for someone else to do that. ...
    (comp.lang.java.programmer)
  • prepared statements across multiple php pages
    ... I am setting up real-time server stats using database INSERTs, ... it seems like a perfect fit for prepared statements. ... Does that mean I lose my performance benefit? ...
    (alt.php)
  • prepared statements across multiple php pages
    ... I am setting up real-time server stats using database INSERTs, ... it seems like a perfect fit for prepared statements. ... Does that mean I lose my performance benefit? ...
    (php.general)
  • Re: PDOStatement::prepare overhead
    ... use of prepared statements as the PHP manual has nothing but good ... They have less overhead for the database, ... the PDO emulation layer. ... class DBint extends PDO{ ...
    (comp.lang.php)
  • Re: PDO: Debugging prepared statements
    ... string with PDO prepared statements? ... You're using PostgreSQL, which supports prepared statements directly. ... statement with the data before sending a complete query to the database. ...
    (comp.lang.php)