0

I am trying to troubleshoot XAMP to figure out what component is slowing performance. I've tried many other fixes but nothing has helped so far.

I found a small program that allowed me to compare PHP speed on different machines - PHP on Windows with XAMPP running 100 times too slow

Now is there something similar with which I could test mysql? I am still a beginner and don't know how to go about writing one on my own.

nshunz
  • 253
  • 1
  • 11

1 Answers1

1

You can run the query in a gui like HeidiSQL and it will tell you how long it took to run. If your query is complex or you just want to check the time in php, you can put this line at the top of your script:

$st = microtime(true);

then after the query has run, put this line in there:

echo ("It took ".(microtime(true) - $st)." seconds");
iAndy
  • 11
  • 3