Forum Moderators: coopster

Message Too Old, No Replies

mysqli vs sprocs

         

Tommybs

4:04 pm on Jul 15, 2009 (gmt 0)

10+ Year Member



Not to sure if this is the correct forum or whether it should be in databases, but i thought mysqli was more a php thing.

I was just wondering if anyone had any opinions on what is better to use performance wise, mysqli prepared statements or stored procedures.

As far as I'm aware prepared statements are only really useful when returning more than 1 result but to me they just seem like another way of writing stored procedures. They have the security benefit of parameters but then again so do stored procedures.

Is there any difference between the 2? I've not done too much investigation into sprocs in mysql (though I do use them on a daily basis with t-sql and .net). All I can really see is that they look rather cumbersome to setup in mysql and then the php code for them is also quite cluttered.

I would appreciate any opinions on this as I'm trying to put together what I hope will become a succesful site and I would like to try and optimise as much as I can from the beginning.

Many Thanks

whoisgregg

10:09 pm on Jul 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is something I've looked at a few times but never done much testing. If you end up doing some testing, hopefully you'll post back your experience. :)