Hi,

Is a stored procedure faster or a normal inline query in a web application? I use mysql but i guess answer must be same for all databases. Maybe not!

Also, how do i test speed of the query in php page and in mysql client application?

Thanks

Recommended Answers

All 2 Replies

Stored procedure would be faster, it is able to take advantage of data caching. Also there would be no intermediary processing of the sql from the web server side. Also a stored procedure is much more maintainable than code, you don't want to have to recompile your code to change a single part of the query.

As far as time on a php page take a look at this
http://www.phpjabbers.com/measuring-php-page-load-time-php17.html

Thanks for the link, very helpful.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.