If you are using php5 and mysql5, is there a substantial advantage to using stored procs over prepared statements? ( i read somewhere you may not get substantial performance gains from mysql5 stored proc)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They are not really the same thing – with stored procedures, your database logic resides inside the database. Prepared statements basically avoid re-parsing queries if they are called multiple times – the performance benefit can vary greatly.
The choice to use one or the other is really dependent on your specific situation. I don’t really use stored procs anymore as I like having all of my logic in one place.