Lukket

Optimize database, tables and fix php mysql query for amxbans6

hello,

i have a mysql 5.1 database which hosts amxbans6 (a counterstrike admin and bans interface) with around 55k bans.

the problem is on the main page that lists the bans its taking like 30 seconds to display 25 records and i can see in mysql's slow log that the query is indeed slow and takes mysqld process to 100% cpu for those seconds..

i need someone to optimize both mysql database and tables of amxbans and its query from [url removed, login to view] ..

amxbans [url removed, login to view] - [url removed, login to view]

the query that is slow looks like this:

SELECT ba.*, [url removed, login to view],se.timezone_fixx, [url removed, login to view] FROM `amx_bans` AS ba LEFT JOIN `amx_serverinfo` AS se ON ba.server_ip=[url removed, login to view] LEFT JOIN `amx_amxadmins` AS aa ON (aa.steamid=ba.admin_nick OR aa.steamid=ba.admin_ip OR aa.steamid=ba.admin_id);

explain says:

+----+-------------+-------+------+---------------+------+---------+------+-------+----------+-------+

| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |

+----+-------------+-------+------+---------------+------+---------+------+-------+----------+-------+

| 1 | SIMPLE | ba | ALL | NULL | NULL | NULL | NULL | 55489 | 100.00 | |

| 1 | SIMPLE | se | ALL | NULL | NULL | NULL | NULL | 13 | 100.00 | |

| 1 | SIMPLE | aa | ALL | steamid | NULL | NULL | NULL | 332 | 100.00 | |

+----+-------------+-------+------+---------------+------+---------+------+-------+----------+-------+

3 rows in set, 1 warning (0.01 sec)

thanks!

Evner: PHP

Se mere: mysql 5.1, optimize mysql, mysql query, fix slow, fix php, fix mysql query, ba, php mysql join table, php cpu 100, mysql join table, mysql table join, fix query, php mysql optimize, fix cpu, cpu 100, mysql tables rows, linux php database, php mysql database query, php display mysql table page, linux mysql slow fix

Om arbejdsgiveren:
( 1 bedømmelse ) Pitesti, Romania

Projekt ID: #3310460

2 freelancere byder i gennemsnit $4 på dette job

evansly

See private message.

$4.25 USD på 1 dag
(23 bedømmelser)
5.0
moncse

See private message.

$4.25 USD på 1 dag
(4 bedømmelser)
2.5