Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3398412
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:38:46+00:00 2026-05-18T04:38:46+00:00

i having a high mysql cpu usage , on server Intel(R) Xeon(R) CPU E5520

  • 0

i having a high mysql cpu usage , on server Intel(R) Xeon(R) CPU E5520 @ 2.27GHz 16 core of processors and 16 G.B ram running on centos 5.4

the load average for the server 500 – 900 , that’s really HIGH NUMBERS

here is some information to help us out

mysql configuration file /etc/my.cnf

[mysqld]
local-infile=0
safe-show-database
skip-locking
skip-innodb
skip-networking
old_passwords
back_log = 50
skip-innodb
max_connections = 40000
key_buffer_size = 640M
myisam_sort_buffer_size = 256M
myisam_max_sort_file_size = 2048M
join_buffer_size = 3M
read_buffer_size = 3M
sort_buffer_size = 3M
table_cache = 8000
thread_cache_size = 1024
wait_timeout = 300
interactive_timeout = 600
connect_timeout = 10
tmp_table_size = 1024M
max_heap_table_size = 1024M
max_allowed_packet = 128M
net_buffer_length = 16384
max_connect_errors = 100000
long_query_time=0
thread_concurrency = 32
concurrent_insert = 2
table_lock_wait_timeout = 30
read_rnd_buffer_size = 4M
bulk_insert_buffer_size = 16M
query_cache_limit = 4M
query_cache_size = 128M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
range_alloc_block_size = 4096
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
max_write_lock_count = 8
tmpdir=/mysqltmp
set-variable=long_query_time=1
log-slow-queries=/var/log/mysql/log-slow-queries.log

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
nice = -10
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 128M

[myisamchk]
key_buffer_size = 640M
sort_buffer_size = 64M
read_buffer_size = 16M
write_buffer_size = 16M

[mysqlhotcopy]
interactive-timeout

===============NOTE I DELETE SOME QUERIES BECAUSE I CANNOT POST HERE MORE THAN 30000 CHARACTER=====================================

    SHOW FULL PROCESSLIST;
    393786 site_dtl localhost site_dtl Query 1 Locked UPDATE dle_post SET news_read = news_read +1 WHERE id = '3657'
    402437 root localhost None Sleep 496 --- ---
    409374 root localhost None Sleep 180 --- ---
    411150 tgofmovi_home localhost tgofmovi_home Sleep 40 --- ---
    411230 tgofmovi_home localhost tgofmovi_home Sleep 36 --- ---
    411401 site_dtl localhost site_dtl Query 1 Locked SELECT *
    FROM dle_post
    WHERE approve = '1'
    AND category
    IN ( 80 )
    ORDER BY date DESC
    LIMIT 0 , 10
    411410 site_dtl localhost site_dtl Query 0 Locked SELECT *
    FROM dle_post
    WHERE approve = '1'
    AND category
    IN ( 80 )
    ORDER BY date DESC
    LIMIT 0 , 10
    411430 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(1,2,7,6,8) AND id NOT IN (0) AND date >= '
    411433 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411439 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411443 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411444 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411490 site_dtl localhost site_dtl Query 2 Sorting result SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411491 site_dtl localhost site_dtl Query 2 Sorting result SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411498 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411509 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411511 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411512 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411513 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411514 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411515 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411526 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411527 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE 
    411541 site_dtl localhost site_dtl Query 2 Sorting result SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411543 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(1,2,7,6,8) AND id NOT IN (0) AND date >= '
    411544 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(1,2,7,6,8) AND id NOT IN (0) AND date >= '
    411545 site_dtl localhost site_dtl Query 2 Sorting result SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411547 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(1,2,7,6,8) AND id NOT IN (0) AND date >= '
    411548 site_dtl localhost site_dtl Query 2 Sorting result SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411549 site_dtl localhost site_dtl Query 2 Sorting result SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411565 site_dtl localhost site_dtl Query 2 Sorting result SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411618 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411619 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(80) ORDER BY date DESC LIMIT 0,10
    411620 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411621 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411622 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411623 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411624 site_dtl localhost site_dtl Query 0 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411625 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(91) AND id NOT IN (0) AND date >= '2010-11
    411796 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411797 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37,43,54,55,56,60,61,62,63,64,69,70,71,46,5
    411798 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37,43,54,55,56,60,61,62,63,64,69,70,71,46,5
    411800 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411801 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411802 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411803 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411804 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411807 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411808 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411809 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411811 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411812 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411813 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411814 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411818 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411819 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411820 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411821 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411822 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411823 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411825 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411826 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411827 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411828 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411829 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(65) AND id NOT IN (0) AND date >= '2010-11
    411830 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411831 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411833 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411834 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(48) AND id NOT IN (0) AND date >= '2010-11
    411836 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411837 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411838 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411841 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411842 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411843 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411845 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411855 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411856 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' AND date >= '2010-
    411857 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411858 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411859 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411860 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411861 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411862 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411863 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411864 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411865 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411866 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411867 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411868 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(37) AND id NOT IN (0) AND date >= '2010-11
    411869 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411870 site_dtl localhost site_dtl Query 1 Sending data SELECT COUNT(*) as count FROM dle_post WHERE category regexp '[[:<:]](81)[[:>:]]' AND approve AND da
    411871 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411872 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411873 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411874 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411875 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411876 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411877 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411878 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411879 site_dtl localhost site_dtl Query 1 Sending data SELECT COUNT(*) as count FROM dle_post WHERE category regexp '[[:<:]](44|80|81|54|55|60|61|62|63|64|
    411890 site_dtl localhost site_dtl Query 1 Sending data SELECT COUNT(*) as count FROM dle_post WHERE category regexp '[[:<:]](44|80|81|54|55|60|61|62|63|64|
    411891 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' AND date >= '2010-
    411892 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411893 site_dtl localhost site_dtl Query 1 Copying to tmp table SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY RAND() LIM
    411894 site_dtl localhost site_dtl Query 1 Sending data SELECT COUNT(*) as count FROM dle_post WHERE category regexp '[[:<:]](44|80|81|54|55|60|61|62|63|64|
    411895 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411896 site_dtl localhost site_dtl Query 1 Sending data SELECT COUNT(*) as count FROM dle_post WHERE category regexp '[[:<:]](36|37|43|44|80|81|54|55|60|61|
    411897 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411898 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411899 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411900 site_dtl localhost site_dtl Query 1 Locked SELECT * FROM dle_post WHERE approve='1' AND category IN(44,54,55,56,60,61,62,63,64,69,70,71) AND id
    411901 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411902 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411903 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411904 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411905 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411907 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411908 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, xfields, title, cat
    411909 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411910 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411911 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411912 site_dtl localhost site_dtl Query 1 Locked SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411919 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411921 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411922 site_dtl localhost site_dtl Query 2 Sorting result SELECT id, title, date, alt_name, category, flag FROM dle_post WHERE approve='1' ORDER BY date DESC
    411950 root localhost mysql Query 0 --- SHOW PROCESSLIST

====================================================

SHOW CREATE TABLE dle_post\G
*************************** 1. row ***************************
Table: dle_post
Create Table: CREATE TABLE `dle_post` (
`id` int(11) NOT NULL auto_increment,
`autor` varchar(40) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`short_story` text NOT NULL,
`full_story` text NOT NULL,
`xfields` text NOT NULL,
`title` varchar(255) NOT NULL default '',
`descr` varchar(200) NOT NULL default '',
`keywords` text NOT NULL,
`category` varchar(200) NOT NULL default '0',
`alt_name` varchar(200) NOT NULL default '',
`comm_num` smallint(5) unsigned NOT NULL default '0',
`allow_comm` tinyint(1) NOT NULL default '1',
`allow_main` tinyint(1) unsigned NOT NULL default '1',
`allow_rate` tinyint(1) unsigned NOT NULL default '1',
`approve` tinyint(1) NOT NULL default '0',
`fixed` tinyint(1) NOT NULL default '0',
`rating` smallint(5) NOT NULL default '0',
`allow_br` tinyint(1) NOT NULL default '1',
`vote_num` smallint(5) unsigned NOT NULL default '0',
`news_read` mediumint(8) NOT NULL default '0',
`votes` tinyint(1) NOT NULL default '0',
`access` varchar(150) NOT NULL default '',
`symbol` char(3) NOT NULL default '',
`flag` tinyint(1) NOT NULL default '0',
`editdate` varchar(15) NOT NULL default '',
`editor` varchar(40) NOT NULL default '',
`reason` varchar(255) NOT NULL default '',
`view_edit` tinyint(1) NOT NULL default '0',
`tags` varchar(255) NOT NULL default '',
`metatitle` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `autor` (`autor`),
KEY `alt_name` (`alt_name`),
KEY `category` (`category`),
KEY `approve` (`approve`),
KEY `allow_main` (`allow_main`),
KEY `date` (`date`),
KEY `symbol` (`symbol`),
KEY `comm_num` (`comm_num`),
KEY `tags` (`tags`),
FULLTEXT KEY `short_story` (`short_story`,`full_story`,`xfields`,`title`)
) ENGINE=MyISAM AUTO_INCREMENT=5265 DEFAULT CHARSET=utf8

1 row in set (0.03 sec)

====================================================

SHOW TABLE STATUS LIKE 'dle_post'\G
*************************** 1. row ***************************
Name: dle_post
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 4971
Avg_row_length: 6685
Data_length: 33232848
Max_data_length: 281474976710655
Index_length: 7998464
Data_free: 0
Auto_increment: 5266
Create_time: 2010-04-01 15:21:19
Update_time: 2010-11-14 19:24:19
Check_time: 2010-06-20 01:32:40
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)

====================================================

SHOW TABLE STATUS LIKE 'dle_post'\G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: NULL
type: NULL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: NULL
Extra: No tables used
1 row in set (0.00 sec)

====================================================

SHOW VARIABLES LIKE '%buffer%';
+-------------------------------+-----------+
| Variable_name | Value |
+-------------------------------+-----------+
| bulk_insert_buffer_size | 16777216 |
| innodb_buffer_pool_awe_mem_mb | 0 |
| innodb_buffer_pool_size | 8388608 |
| innodb_log_buffer_size | 1048576 |
| join_buffer_size | 3145728 |
| key_buffer_size | 671088640 |
| myisam_sort_buffer_size | 268435456 |
| net_buffer_length | 16384 |
| preload_buffer_size | 32768 |
| read_buffer_size | 3145728 |
| read_rnd_buffer_size | 4194304 |
| sort_buffer_size | 3145728 |
+-------------------------------+-----------+
12 rows in set (0.00 sec)

====================================================

i hope that this information is all required to fix this issue

NOTE : this commands has been executed when the server load 180 – 350

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:38:46+00:00Added an answer on May 18, 2026 at 4:38 am

    Do you have a slow query log? Post the EXPLAIN statements too.

    Your ORDER BY RAND() will be slow for big tables, there are better methods, like this example. Basically you just generate a random number between 0 and MAX(PRIMARY_KEY), then do SELECT * from table WHERE PRIMARY_KEY > @that_random_number LIMIT 1.

    So instead of SELECT * from dle_post ORDER BY RAND() LIMIT 1;

    Do this:

    1. Calculate the maximum value of your primary key (auto_increment) and store this in a variable.

      SELECT MAX(PRIMARY_ID_COLUMN_NAME) FROM dle_posts LIMIT 1;

    2. Generate a random number (best in your application to avoid the database roundtrip time, although you can combine this in step 1 by replacing the MAX by FLOOR(RAND() * MAX);. But example in PHP:

      $chosen = rand(0,$max);

    3. Now get the first row with the primary key equal or bigger than this value:

      SELECT * FROM dle_posts WHERE PRIMARY_ID_COLUMN_NAME > $chosen LIMIT 1

    Does an index on (approve, category, date) help?

    Your slow Query log shows no big problems. If you can modify the sourcecode, you can rewrite following query:

    SELECT COUNT(*) as count FROM dle_users where FROM_UNIXTIME(reg_date) > NOW() - INTERVAL 1 HOUR;
    

    to a query where you don’t use the now, but have your application fill a timestamp. Now the query cache can actually cache the query.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been having performance issues with a high traffic ASP.NET 2.0 site running on
Here's a real noobish MySQL query problem I'm having. I have a high score
I'm having a problem on a master MySQL (5.0, Linux) server: I tried to
I'm having trouble getting Hibernate to perform a bulk insert on MySQL. I'm using
I'm developing a high-volume web application, where part of it is a MySQL database
I'm having some issues getting high resolution tab bar icons displaying correctly for iPhone
I'm a first year computer science student, having returned several years after finishing high
Having been a PHP developer on LAMP servers for quite a while, is there
Having a heckuva time with this one, though I feel I'm missing something obvious.
Having worked with Classic ASP for about 2 years now by creating a few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.