Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    8

    Question Unanswered: anybody used prepared statements in 4.1 succesfully?

    Has anybody used prepared statements in mySQL 4.1 succesfully. By succesfull I mean quicker !

    I have some prepared statement in my app and they take just as long the second++ time as they do hte first. My querys may need to be optimized (i just moved over from Access), but even so, shouldn't they be quicker the second time around.

    It looks as if it recompile the statement each time

  2. #2
    Join Date
    Jan 2004
    Posts
    24
    It all depends on what client you are using. For example PHP 4.3.x if you are using this, it does not work with prepared statements. But PHP 5.0 does work with prepared statements if you use the mysqli commands.

    Since 4.1.x is fairly new some clients still do not support the prepared statements which technically is faster.

    We use PHP, and since we are not using PHP 5 yet, we can't use prepared statements. But the table cache and the query cache at least in our opinion are just as fast as prepared statements will be in the future.

    Donny
    http://www.phpscripts.com/

  3. #3
    Join Date
    Jan 2004
    Posts
    8
    I should have mentioned I was using Connector/J 3.0. I was in contact with someone from mySQL AB. He told me that the newest version of Connector/J (3.1) will support prepared statements. I have tried it using one of thier nightly builds, but I had a problem using dates. I'll try it again with the next stable build and if it works I'll let you guys know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •