views:

48

answers:

3

Are there any ways to check whether my Mysql database and PHP script are optimal? I want to figure it out and fix if it's possible till I publish it on internet for many users.
Thanks.

+1  A: 

You can use some benchmarking utility, like apache benchmark, ab to emulate some traffic to your site. If you have Apache server installed on your system, just switch to it's bin directory and run ab from there.

ab -n 100 -c 10 http://example.com/

and play with parameters and see.

But of course without an actual data and not on the real server the results will be just approximate.

Col. Shrapnel
A: 

What do you mean by optimal? This question is very vague.

Imperatorr
A: 

As Col. Shrapnel said, AB is a good start.

If you want to benchmark only your database, MySQL offers a nice benchmark suite.

http://dev.mysql.com/doc/refman/5.0/en/mysql-benchmarks.html

jlindenbaum