Msecs per row jumps 6x at about 10,000?
Posted by: JohnGeddes (
Date: May 09, 2017 09:36PM

I have a php page that reads a mysql table (an event log) and outputs the results in an html table. There can be a lot of text in some rows so I am not expecting super-fast loading.

There are 17,000 records in the dataset, and I really wanted to display them all at one view. But that times out at 120 seconds.

So I experimented at reported time (time measured at top of php page, and at bottom, listing the difference) vs number of rows served. The graph is at

The graph show a roughly-linear section up to about 10,000 rows, and a second roughly-linear section above 10,000 rows - but at a much steeper rate: the first 10,000 rows take approx 0.4 msecs per row; beyond 10,000 rows, it takes about 2.5 msecs per row. Times for the first 8000 and the last 8,000 rows are pretty much the same, so it doesn't look like a rogue record - it seems to be a sudden slowing at about the 10,000 record mark.

Uninstalling 32-bit WAMP and moving to 64-bit made load times SLOWER by about 10%. Increasing key_buffer_size to 2G and max_allowed_packet to 256M made no difference (in fact about 1% slower)

Any suggestions of why this might be happening?

Win 64 Pro 64-bit running on i5 with 8Gb RAM. Wamp 3.0 32-bit (and later 64-bit) with Apache=2.4.23, Mysql=5.7.14, PHP=5.6.25
WampServer icon=Green

Options: ReplyQuote
Re: Msecs per row jumps 6x at about 10,000?
Posted by: RiggsFolly (Moderator)
Date: May 10, 2017 11:17AM


There could be any number of reasons for this.

Can I suggest that you look for some MYSQL tuning guides as without a much greater knowledge of your exact database config and structure we cannot help with this.

Tuning is really down to the database adminstrator and the specific database and usage thereof and not specifically a WAMPServer issue.

(Windows 10 Pro 64bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote

Sorry, only registered users may post in this forum.