|
You don't need mysql stored procedures. Mainly because mysql does not support them.
First you should perform mysql indexing. If you massively use "select ... where ..." then you should create indexes for fields used in where clause. Read about this in mysql manual, section 5.4.3 How MySQL Uses Indexes and two following sections.
Second you should find the bottleneck in your scripts. Maybe you misuse select queries by selecting something multiple times. Create a getmicrotime() function as described in php manual for microtime() function and call it from different places of your script to find an operation which takes too much time to execute.
Usually creating indexes helps a lot, but anyway there is always room for further optimization.
|