Recent Topics

1 Jun 20, 2008 15:37    

My b2evolution Version: 2.4

Hi,

I recently updated to 2.4 and the blog is dramatacly slow. It now takes up 50seconds! to render the homepage. I enabled debugging and here is the result:

Debug info
Timers
Category Time % Count
_blog_main.inc 0.006 0.01% 1
_main.inc 9.832 21.16% 1
_main.inc:requires 0.078 0.17% 1
abstractsettings_CollectionSettings_get 0.136 0.29% 705
abstractsettings_GeneralSettings_get 0.094 0.20% 286
abstractsettings_UserSettings_get 0.007 0.02% 21
article_titles_plugin_(#19) 0.103 0.22% 1
calendar_plugin_(#5) 2.805 6.04% 1
democracy_plugin_(#16) 0.010 0.02% 4
ministats_plugin_(#20) 6.029 12.98% 1
plugin_init 0.006 0.01% 2
plugins_register 0.027 0.06% 10
sql_queries 40.050 86.21% 120
total 46.455 100.00% 1
+ 6 < 0.005s
Database queries: 120.
Memory usage: 9.2 MB

The following queries take too much time:

Query #16: ItemList2::count_total_rows()
SELECT COUNT( DISTINCT post_ID)
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-06-20 15:26:41')
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 4 )
OR post_status IN ('published','protected') ) )
Rows: 1 – Time: 5.2460s (13.10%)

Query #17: ItemList2::Query() Step 1: Get ID list
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-06-20 15:26:41')
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 4 )
OR post_status IN ('published','protected') ) )
ORDER BY post_datestart DESC, post_ID DESC
LIMIT 20
Rows: 20 – Time: 2.4973s (6.24%)

Query #18: ItemList2::Query() Step 2
SELECT *
FROM evo_items__item
WHERE post_ID IN (27962,27974,27961,27960,27959,27958,27957,27956,27955,27954,27953,27952,27951,27950,27949,27948,27947,27946,27945,27944)
ORDER BY post_datestart DESC, post_ID DESC
Rows: 20 – Time: 18.2130s (45.48%)

Query #99:
SELECT COUNT(DISTINCT post_ID) AS item_count, EXTRACT(DAY
FROM post_datestart) AS myday
FROM (evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID) INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE EXTRACT(YEAR
FROM post_datestart) = '2008'
AND EXTRACT(MONTH
FROM post_datestart) = '06'
AND (cat_blog_ID = 1)
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 4 )
OR post_status IN ('published','protected') ) )
AND (post_datestart <= '2008-06-20 15:27:09')
GROUP BY myday
Rows: 19 – Time: 2.5509s (6.37%)

Query #116: ItemList2::count_total_rows()
SELECT COUNT( DISTINCT post_ID)
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 4 )
OR post_status IN ('published','protected') ) )
Rows: 1 – Time: 2.0676s (5.16%)

Query #117: ItemList2::Query() Step 1: Get ID list
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 4 )
OR post_status IN ('published','protected') ) )
ORDER BY post_views desc, post_ID desc
LIMIT 25
Rows: 25 – Time: 2.4440s (6.10%)

Is there any way to increase speed on my blog? I have about 27,864 posts in my database, and there are about 300.000 visitors per month on my blog. So it is a heavy duty blog. Are there any steps I could take?

2 Jun 20, 2008 15:43

Well something I did helped a little bit by gaining performance of about 10seconds. In mysqladmin try to optimize your tables. Maybe the install-script should do this automatically?

3 Jun 20, 2008 15:50

Also I just truncated the tables
evo_sessions

evo_hitlog

and

evo_useragents

to see if thit helped.

4 Jun 20, 2008 16:01

A little more perfomance was gained by changing the default order sequence of my evo_items__item table:

[sql]
ALTER TABLE `evo_items__item` ORDER BY `post_ID` DESC
[/sql]

5 Jun 20, 2008 16:10

Ok after these changes, the following performance errors are now here:

Query #26: Get ID of next item
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-06-20 16:05:01')
AND ( ( post_status IN ('published') ) )
AND (( post_datestart < '2008-06-20 14:51:10'
OR ( post_datestart = '2008-06-20 14:51:10'
AND post_ID < 27974) ))
ORDER BY post_datestart DESC, post_ID DESC
LIMIT 1

Rows: 1 – Time: 11.0501s (46.58%)

Query #28: Results::Query()
SELECT file_ID, file_title, file_root_type, file_root_ID, file_path, file_alt, file_desc
FROM evo_links INNER JOIN evo_files ON link_file_ID = file_ID
WHERE link_itm_ID = 27974
ORDER BY link_ID

Rows: 0 – Time: 1.1929s (5.03%)

Query #46:
SELECT COUNT(DISTINCT post_ID) AS item_count, EXTRACT(DAY
FROM post_datestart) AS myday
FROM (evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID) INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE EXTRACT(YEAR
FROM post_datestart) = '2008'
AND EXTRACT(MONTH
FROM post_datestart) = '06'
AND (cat_blog_ID = 1)
AND ( ( post_status IN ('published') ) )
AND (post_datestart <= '2008-06-20 16:05:13')
GROUP BY myday
Rows: 19 – Time: 3.8731s (16.33%)

Query #64: ItemList2::Query() Step 1: Get ID list
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND ( ( post_status IN ('published') ) )
ORDER BY post_views desc, post_ID desc
LIMIT 25

Rows: 25 – Time: 6.0870s (25.66%)

Any tips?

6 Jun 20, 2008 16:14

Ok tried something else

ALTER TABLE `evo_postcats` ORDER BY `postcat_post_ID` DESC

Appears to help a little as well.

7 Jun 20, 2008 16:21

Well I got the performance back to about 30 seconds now, but this is still very bad perfomance and much worse then my previous 1.9 version.

Any help would be appreciated.

8 Jun 20, 2008 20:17

How much posts do you have in your(s) blog(s) ?
Are you using mysql 4 or mysql 5 ?
Are you using ISAM or INNODB ?

9 Jun 21, 2008 10:00

I have 27,864 posts in my database only in one blog, and there are about 300.000 visitors per month on my blog. So it is a heavy duty blog.

I am using php PHP Version 5.1.6 and MySQL 5.0.22.

I have got no clue was innodb or isam means, and where I can look this up. Can you give me some more info on that?

10 Jun 21, 2008 15:25

Big blog ;-)

Try to lower the number or articles displayed per page (in blogs settings, your blog, general)

May be you can setup a static page (name it index.html) in front of index.php
It's in blog settings, your blog, advanced, generate the static homepage.
Then add an .htaccess file and change default document to display in .htaccess (put index.html before index.php)
(you will find a .htaccess.sample in b2evolution root folder).

# DEFAULT DOCUMENT TO DISPLAY:
# this will select the default blog template to be displayed
# if the URL is just .../blogs/
<IfModule mod_dir.c>
	DirectoryIndex index.html index.php
</IfModule>


You will have to generate this static page each time you'll publish a new post.

Myisam and innodb are storage engine for mysql. http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html

11 Jun 22, 2008 13:44

Also you might want to set a low number of days worth of traffic to store. That will cause your hitlogs and sessions tables to stay a bit smaller. um... hitlogs for sure because after midnight it will prune the previous days traffic. I am fairly certain that sessions associated with those hits will also be pruned.

12 Jun 23, 2008 01:41

slamp wrote:

Big blog ;-)

Try to lower the number or articles displayed per page (in blogs settings, your blog, general)

That is not an option how my board is setup. People just use these bunch of articles to read them all. Also Search-engines like big content-sites, so I need the way it is displayed now. (see http://www.goedzo.com for what I mean, that is my site).
slamp wrote:

May be you can setup a static page (name it index.html) in front of index.php

This is also not an option for all the dynamic content I have. Also my frontpage is not the most read page on my blog. Some articles are read more than 10.000 times. I also have dynamic adverts running on the blog, so a static frontpage is not an option for me. And I also pre-post a lot of articles.
slamp wrote:

Myisam and innodb are storage engine for mysql. http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html

In mysql admin I see this:

InnoDB has been disabled for this MySQL server.

MyISAM is the default storage engine on this MySQL server.
Data pointer size 6 B
Automatic recovery mode OFF
Maximum size for temporary sort files 2,048 MiB
Repair threads 1
Sort buffer size 8,192 KiB
myisam_stats_method nulls_unequal
delay_key_write ON
bulk_insert_buffer_size 8,192 KiB
skip_external_locking ON

Is there some tweaking I can do? Or should I enable innodb? (And how can I do this?)

13 Jun 23, 2008 22:05

I played a little bit with using in memory tables. I converted the evo_hitlog and evo_useragents to this. It apears to improve some performance again :) . Anyone got some more tips?

15 Jun 23, 2008 23:10

Yes it is a dedicated server, but it is strange that it takes that much time to load the image.

Maybe a strange question, but is your connection not a bit loaded? I know the page is quite big to load, so there could be some issues with available bandwith on your side.

p.s. the big loading times above came from the debug window from within b2evo, so I don't think that should be "the" issue. (It is an issue though).

16 Jun 23, 2008 23:11

p.s. functions.js took more time, coz I was uploading this in my ftp software to fix some bugs in b2evo (another topic I posted this in). You'd probably ran into a locking issue there.

17 Jun 24, 2008 11:04

I's better this morning: 15.21s to load your page. My connection is about 1Mb and I do not use p2p ;-)

http://slamp.free.fr/b2evo/goedzo_1_15.21.png

Maybe, you have a lot of requests on evening and there is too much load for your server. Do you have access to server's load, I mean CPU Usage, RAM, Load Average ?

I noticed that you have a lot of small images on your page.
You can optimize the load by using CSS Sprite < http://www.alistapart.com/articles/sprites >
< http://css-tricks.com/css-sprites-what-they-are-why-theyre-cool-and-how-to-use-them/ >

Anyway it isn't explain, why mysql is so slow.

18 Jun 24, 2008 13:26

slamp wrote:

I'm using webdevelopper firefox addon to check download time.

I've downloaded the following plugin:
https://addons.mozilla.org/en-US/firefox/addon/60
I have now a menubar with all kinds of buttons, but there I cannot find any way to get the loading times. Can you please tell me what plugin you used, and what kind of options you used in that plugin, to get the screen you've grabbed above?

19 Jun 24, 2008 13:29

I see you've used firebug to do this. So never mind the above question :)

20 Jun 24, 2008 14:02

I've also enabled eaccelerator to speed some things up, which now brought back the loading to 10 seconds. I hope this keeps working, because the last times I used eaccelerator my server chrashed every night, only reviving with a power cycle. But I still have high loading MySQL times, so this has to be fixed somehow.

More tips are very welcome!

21 Jun 24, 2008 14:16

I found another big winner in increasing performance. I changed the ministats plugin by only showing the most viewed articles, and removing the most commented articles. It appears that the queries used in there take a lot of processing power.

22 Jun 24, 2008 14:24

I've also enabled eaccelerator to speed some things up, which now brought back the loading to 10 seconds.

Interesting.

Active the slow query log in /etc/mysql/my.cnf

# Here you can see queries with especially long duration
log_slow_queries          = /var/lib/mysql/mysql-slow.log


You will have to restart mysql server.

Check this about mysql tunning: http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/
http://www.devshed.com/c/a/MySQL/MySQL-Optimization-part-2/5/

23 Jun 25, 2008 01:06

Thanks for the tip slamp, I now enabled this to see which queries take a long time.

It seems that the ministats still took a lot of time, so I reduced the most viewed articles to 7 articles. I also enabled Innodb on the evo_items__item table, categories and some other tables I saw in debug mode taking a lot of time.

For now I've got the following results:

Timers
Category Time % Count
_main.inc 0.676 11.12% 1
_main.inc:requires 0.026 0.43% 1
abstractsettings_CollectionSettings_get 0.112 1.84% 672
abstractsettings_GeneralSettings_get 0.028 0.46% 303
abstractsettings_UserSettings_get 0.006 0.10% 21
article_titles_plugin_(#19) 0.077 1.27% 1
calendar_plugin_(#5) 0.153 2.52% 1
democracy_plugin_(#16) 0.009 0.15% 4
ministats_plugin_(#20) 0.392 6.45% 1
plugin_init 0.005 0.08% 2
plugins_register 0.012 0.20% 10
sql_queries 4.780 78.62% 104
total 6.080 100.00% 1
+ 7 < 0.005s

Which is a huge win from 45seconds to 7. Which is still not so acceptable, but do-able.

The following queries are red:

Query #16: ItemList2::count_total_rows()
SELECT COUNT( DISTINCT post_ID)
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-06-25 00:59:55')
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 4 )
OR post_status IN ('published','protected') ) )
Rows: 1 – Time: 2.5218s (52.76%)
Query #17: ItemList2::Query() Step 1: Get ID list
SELECT DISTINCT post_ID
FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 1)
AND (( post_ptyp_ID IS NULL
OR post_ptyp_ID NOT IN (1000) ))
AND (post_datestart <= '2008-06-25 00:59:55')
AND ( ( ( post_status = 'private'
AND post_creator_user_ID = 4 )
OR post_status IN ('published','protected') ) )
ORDER BY post_datestart DESC, post_ID DESC
LIMIT 20
Rows: 20 – Time: 1.6873s (35.30%)

24 Jun 25, 2008 10:11

I think it's not a good idea to use innodb and myisam at the same time.
For pure performance, I red that myisam is better than innodb. IMO I prefer to use innodb. innodb is great for transaction db and b2evolution are able to use it. In this case you should uncommented innodb engine in conf/_advanced.php and turn transaction to true.

$db_config['table_options'] = ' ENGINE=InnoDB ';
$db_config['use_transactions'] = true

If you decided to use innodb, I have some tweaks to tune mysql

25 Jun 25, 2008 10:54

I'm thinking about something else. try to set obhandler on in _advanced.php

 * Display elements that are different on each request (Page processing time, ..)
 * Set this to true to prevent displaying minor changing elements (like time) in order not to have artificial content changes
 * @global boolean Default: false
$obhandler_debug = true;

In the backoffice, Global Settings | Features, set
- Outbound pings & email notifications: Asynchronous
- Auto pruning: With a scheduled job
Then in Tools | Scheduler add 2 jobs for "ping" and "prune old hits"
Last, you must set a crontab on your server to call cron_exec.php
For example add this script to /etc/cron.hourly/ folder

#!/bin/sh
/usr/bin/wget -o /tmp/blog.out -O  /tmp/blog.html "http://www.goedzo.com/path_blog_installation/cron/cron_exec.php" > /dev/null 2>&1

26 Jun 25, 2008 11:16

slamp wrote:

I think it's not a good idea to use innodb and myisam at the same time.
If you decided to use innodb, I have some tweaks to tune mysql

Well I've read that mixing them i just a good way of performance tuning, mixing best of both worlds. And I noticed that it really speed things up.
I am curious about those tweaks you have for mysql and if they work for mixed environments.

27 Jun 25, 2008 11:22

slamp wrote:

In the backoffice, Global Settings | Features, set
- Outbound pings & email notifications: Asynchronous
- Auto pruning: With a scheduled job
Then in Tools | Scheduler add 2 jobs for "ping" and "prune old hits"

Good tip! This also spead thinks op for me.

28 Jun 25, 2008 11:27

Well i don't know about you, but on my screen the site seems pretty fast now :) . I think this topics has become a great guide on how to speed up b2evo ;)

29 Jun 25, 2008 11:53

About mysql. Make a backup.
Turn all table to innodb.
Make a backup.
Edit /etc/my.cnf and in section mysqld add:

[mysqld]
innodb_buffer_pool_size=128M <- see bellow
innodb_additional_mem_pool_size=2M
innodb_log_file_size=16M
innodb_log_files_in_group=3
innodb_log_buffer_size=8M
innodb_autoextend_increment=25
innodb_support_xa=0
innodb_flush_method=O_DIRECT

Make a backup

stop the server (don't do this when you have a lot of users...)
locate and rename ib_logfile0 to ib_logfile0_old
rename ib_logfile1 to ib_logfile1_old
rename (if exists) ib_logfile2 to ib_logfile2_old
restart server

the size of innodb_buffer_pool_size depends on your data

You also should account for growth of course. You need buffer pool a bit (say 10%) larger than your data

http://www.mysqlperformanceblog.com/2007/11/03/choosing-innodb_buffer_pool_size/

30 Jun 25, 2008 12:03

I now have:

# Data files must be able to hold your data and indexes.
# Make sure that you have enough free disk space.
innodb_data_file_path=ibdata1:10M:autoextend
innodb_data_home_dir=/var/lib/mysql

# Set buffer pool size to 50-80% of your computer's memory
set-variable=innodb_buffer_pool_size=100M
set-variable=innodb_additional_mem_pool_size=10M

# Set the log file size to about 25% of the buffer pool size
set-variable=innodb_log_file_size=20M
set-variable=innodb_log_buffer_size=8M

innodb_flush_log_at_trx_commit=1
innodb_flush_method=O_DIRECT

31 Jun 25, 2008 14:26

Mini stats is a bad performer. I'm thinking about rewriting it to cache the stats. In the meantime, I've removed it from my site.

32 Jun 25, 2008 15:12

Well if you did, please provide me your update ;)

33 Jun 25, 2008 17:56

nims wrote:

I now have:
innodb_data_file_path=ibdata1:10M:autoextend

set-variable=innodb_buffer_pool_size=100M

What's the size of your database ?
How much ram do you have ?

34 Jun 25, 2008 21:06

I have 1GB of ram and the database size is 112MB, but notice that only some tables are innodb, so the total size of the innodb tables is now about 65MB.

35 Jun 26, 2008 09:21

mysql DB tunning seems ok. Let's go to check the web server.
I guess you are using apache 2.2.3
Could you check if you are using MPM prefork or MPM worker ?
Issue the command: /usr/sbin/httpd2 -l

In /etc/apache2/server-tuning.conf (or in /etc/apache2/apache2.conf) could you give me the value of
StartServers, MinSpareServers, MaxSpareServers, ServerLimit, MaxClients, MaxRequestsPerChild (or if you are using worker
StartServers, MinSpareThreads, MaxSpareThreads, ThreadLimit, MaxClients, ThreadsPerChild, MaxRequestsPerChild) ?

36 Jun 26, 2008 09:57

Server version: Apache/2.2.3
Server built: Jun 26 2007 19:26:32

[root@rm-1004-19 ~]# /usr/sbin/httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c

and

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

37 Jun 26, 2008 10:00

Maybe top is also of interest


top - 09:56:22 up 1 day,  9:45,  1 user,  load average: 5.17, 5.92, 5.94
Tasks: 128 total,   7 running, 121 sleeping,   0 stopped,   0 zombie
Cpu(s): 94.4%us,  5.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.7%si,  0.0%st
Mem:    970376k total,   872240k used,    98136k free,    75484k buffers
Swap:  1052248k total,   224976k used,   827272k free,   362216k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
14484 mysql     15   0  246m 117m 3236 S 27.2 12.4  83:19.56 mysqld
17541 root      25   0 65532  42m 2404 R 15.7  4.5  16:17.13 MailScanner
19409 root      25   0 63156  40m 2404 R 13.5  4.2   9:14.91 MailScanner
14957 root      25   0 71736  48m 2404 R 13.1  5.1  44:33.10 MailScanner
18252 root      25   0 64344  41m 2404 R 13.1  4.4  12:36.88 MailScanner
23484 admin16   19   0 39272  16m  11m R  9.5  1.7   0:00.29 php-cgi
 5527 apache    15   0 32380 2940 1632 S  0.3  0.3   0:05.44 httpd
23401 root      15   0  2196 1056  808 R  0.3  0.1   0:00.27 top
    1 root      15   0  2036   92   68 S  0.0  0.0   0:27.26 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
    4 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.08 events/0
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
    7 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
   10 root      10  -5     0    0    0 S  0.0  0.0   0:00.35 kblockd/0
   11 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
   88 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 cqueue/0
   91 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
   93 root      16  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  157 root      12  -5     0    0    0 S  0.0  0.0  10:47.92 kswapd0
  158 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
  308 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kpsmoused
  331 root      17  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0

38 Jun 26, 2008 16:14

apache2 conf seems ok. We will check it a little more.
Do you have apache server-status installed ? If no, try to un-comment (or add) those lines to your apache2.conf or mod_status.conf file

ExtendedStatus On

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost
    Allow from your_ip_address
</Location>


http://httpd.apache.org/docs/2.2/mod/mod_status.html

Then in a browser access to http://yourdomain.com/server-status (or using lynx http://localhost/server-status)
You will see something like the image bellow. Do it at the peak time.
http://slamp.free.fr/b2evo/server-status.png

Slamp
PS: your load average is not great. 5 is a little too important for me. You must check if it's normal that MailScanner take 57% of CPU cycle.

39 Jun 26, 2008 17:11

I've found the cause of the high mailscanner load, and it's called spammers. A lot of mails are being tried to drop on my box and they are then rejected. What I thought, was that mailscanner only uses the idle time, so i think this wouldn't be an issue.

server status is not installed. Is there any other way to display it, without changing the httpd.conf?

40 Jun 26, 2008 17:37

server status is not installed. Is there any other way to display it, without changing the httpd.conf?

No. You can try to only reload the conf using "apache2 reload"

41 Jul 02, 2008 08:18

slamp wrote:

Active the slow query log in /etc/mysql/my.cnf

# Here you can see queries with especially long duration
log_slow_queries          = /var/lib/mysql/mysql-slow.log


You will have to restart mysql server.

Few days after, it's now time to analyse the slow query log.
You can use this perl script to analyse the log file http://www.mysqlperformanceblog.com/files/utils/mysql_slow_log_parser

Could you report us the most often slow query ?

42 Jul 04, 2008 09:46

Here they are:


 Starting... 
### 61 Queries 
### Total time: 2033, Average time: 33.327868852459
### Taking 11  to 151  seconds to complete
### Rows analyzed 38098 - 108655
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) AND (( post_datestart > 'XXX' OR ( post_datestart = 'XXX' AND post_ID > XXX) )) ORDER BY post_datestart ASC, post_ID ASC LIMIT XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-01 04:09:49') AND ( ( post_status IN ('published') ) ) AND (( post_datestart > '2005-01-29 11:02:22' OR ( post_datestart = '2005-01-29 11:02:22' AND post_ID > 1338) )) ORDER BY post_datestart ASC, post_ID ASC LIMIT 1;


### 43 Queries 
### Total time: 1721, Average time: 40.0232558139535
### Taking 11  to 131  seconds to complete
### Rows analyzed 56200 - 56464
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) );

SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-01 09:12:20') AND ( ( post_status IN ('published') ) );


### 52 Queries 
### Total time: 1370, Average time: 26.3461538461538
### Taking 11  to 152  seconds to complete
### Rows analyzed 57772 - 112441
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) AND (( post_datestart < 'XXX' OR ( post_datestart = 'XXX' AND post_ID < XXX) )) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-01 04:10:04') AND ( ( post_status IN ('published') ) ) AND (( post_datestart < '2008-05-03 17:01:58' OR ( post_datestart = '2008-05-03 17:01:58' AND post_ID < 26999) )) ORDER BY post_datestart DESC, post_ID DESC LIMIT 1;


### 34 Queries 
### Total time: 679, Average time: 19.9705882352941
### Taking 11  to 57  seconds to complete
### Rows analyzed 84151 - 84453
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND ( ( post_status IN ('XXX') ) ) ORDER BY post_views desc, post_ID desc LIMIT XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND ( ( post_status IN ('published') ) ) ORDER BY post_views desc, post_ID desc LIMIT 12;


### 41 Queries 
### Total time: 646, Average time: 15.7560975609756
### Taking 11  to 23  seconds to complete
### Rows analyzed 84129 - 112476
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-01 09:13:53') AND ( ( post_status IN ('published') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 24;


### 29 Queries 
### Total time: 374, Average time: 12.8965517241379
### Taking 11  to 20  seconds to complete
### Rows analyzed 56200 - 56398
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND ( ( post_status IN ('XXX') ) );

SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND ( ( post_status IN ('published') ) );


### 9 Queries 
### Total time: 300, Average time: 33.3333333333333
### Taking 13 , 17 , 17 , 19 , 19 , 21 , 22 , 23 , 149  seconds to complete
### Rows analyzed 57052, 57150, 57150, 57150, 57150, 57150, 57346, 57486 and 57486
SELECT COUNT(DISTINCT post_ID) AS item_count,
													EXTRACT(DAY FROM post_datestart) AS myday
									FROM (evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID)
										INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
									WHERE EXTRACT(YEAR FROM post_datestart) = 'XXX'
										AND EXTRACT(MONTH FROM post_datestart) = 'XXX'
										 AND (cat_blog_ID = XXX) AND ( ( post_status IN ('XXX') ) ) AND (post_datestart <= 'XXX')
									GROUP BY myday;

SELECT COUNT(DISTINCT post_ID) AS item_count,
													EXTRACT(DAY FROM post_datestart) AS myday
									FROM (evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID)
										INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
									WHERE EXTRACT(YEAR FROM post_datestart) = '2008'
										AND EXTRACT(MONTH FROM post_datestart) = '06'
										 AND (cat_blog_ID = 1) AND ( ( post_status IN ('published') ) ) AND (post_datestart <= '2008-06-29 04:31:47')
									GROUP BY myday;


### 2 Queries 
### Total time: 297, Average time: 148.5
### Taking 72 , 225  seconds to complete
### Rows analyzed 110124 and 110124
use new_goedzo_com_bXXXevo;
SELECT DISTINCT post_ID, post_datestart, post_datemodified, post_title, post_url,
									post_excerpt, post_urltitle, post_main_cat_ID, post_ptyp_ID  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC;

use new_goedzo_com_b2evo;
SELECT DISTINCT post_ID, post_datestart, post_datemodified, post_title, post_url,
									post_excerpt, post_urltitle, post_main_cat_ID, post_ptyp_ID  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (post_datestart <= '2008-06-25 03:59:44') AND ( ( post_status IN ('published') ) ) ORDER BY post_datestart DESC, post_ID DESC;


### 3 Queries 
### Total time: 256, Average time: 85.3333333333333
### Taking 13 , 38 , 205  seconds to complete
### Rows analyzed 81531, 82451 and 82644
use new_goedzo_com_bXXXevo;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) AND (( post_datestart < 'XXX' OR ( post_datestart = 'XXX' AND post_ID < XXX) )) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

use new_goedzo_com_b2evo;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-06-29 04:46:47') AND ( ( post_status IN ('published') ) ) AND (( post_datestart < '2008-05-22 20:01:02' OR ( post_datestart = '2008-05-22 20:01:02' AND post_ID < 27351) )) ORDER BY post_datestart DESC, post_ID DESC LIMIT 1;


### 5 Queries 
### Total time: 233, Average time: 46.6
### Taking 12 , 12 , 19 , 52 , 138  seconds to complete
### Rows analyzed 56222, 56222, 56398, 56398 and 56464
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (EXTRACT(YEAR FROM post_datestart)=XXX) AND (EXTRACT(MONTH FROM post_datestart)=XXX) AND (EXTRACT(DAY FROM post_datestart)=XXX) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) );

SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (EXTRACT(YEAR FROM post_datestart)=2008) AND (EXTRACT(MONTH FROM post_datestart)=6) AND (EXTRACT(DAY FROM post_datestart)=1) AND (post_datestart <= '2008-07-01 04:21:16') AND ( ( post_status IN ('published') ) );


### 3 Queries 
### Total time: 101, Average time: 33.6666666666667
### Taking 15 , 33 , 53  seconds to complete
### Rows analyzed 56336, 56398 and 56538
use goedzo_comweblog;
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) );

use goedzo_comweblog;
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-02 04:12:15') AND ( ( post_status IN ('published') ) );


### 4 Queries 
### Total time: 82, Average time: 20.5
### Taking 12 , 14 , 14 , 42  seconds to complete
### Rows analyzed 88680, 88680, 94368 and 111627
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX, XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-06-26 09:47:04') AND ( ( post_status IN ('published') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 10104, 24;


### 5 Queries 
### Total time: 74, Average time: 14.8
### Taking 11 , 11 , 12 , 19 , 21  seconds to complete
### Rows analyzed 9554, 63849, 64906, 77548 and 79765
use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) AND (( post_datestart > 'XXX' OR ( post_datestart = 'XXX' AND post_ID > XXX) )) ORDER BY post_datestart ASC, post_ID ASC LIMIT XXX;

use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-06-26 04:51:48') AND ( ( post_status IN ('published') ) ) AND (( post_datestart > '2008-03-02 01:01:33' OR ( post_datestart = '2008-03-02 01:01:33' AND post_ID > 25651) )) ORDER BY post_datestart ASC, post_ID ASC LIMIT 1;


### 5 Queries 
### Total time: 71, Average time: 14.2
### Taking 11 , 12 , 13 , 13 , 22  seconds to complete
### Rows analyzed 20, 20, 20, 20 and 20
SELECT *
							FROM evo_categories
						 ORDER BY cat_name;

SELECT *
							FROM evo_categories
						 ORDER BY cat_name;


### 3 Queries 
### Total time: 51, Average time: 17
### Taking 11 , 18 , 22  seconds to complete
### Rows analyzed 73553, 76355 and 82533
use new_goedzo_com_bXXXevo;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) AND (( post_datestart > 'XXX' OR ( post_datestart = 'XXX' AND post_ID > XXX) )) ORDER BY post_datestart ASC, post_ID ASC LIMIT XXX;

use new_goedzo_com_b2evo;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-04 04:58:57') AND ( ( post_status IN ('published') ) ) AND (( post_datestart > '2005-12-24 23:22:43' OR ( post_datestart = '2005-12-24 23:22:43' AND post_ID > 9261) )) ORDER BY post_datestart ASC, post_ID ASC LIMIT 1;


### 3 Queries 
### Total time: 49, Average time: 16.3333333333333
### Taking 11 , 14 , 24  seconds to complete
### Rows analyzed 55212, 55212 and 55212
use new_goedzo_com_bXXXevo;
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) );

use new_goedzo_com_b2evo;
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-01 14:07:07') AND ( ( post_status IN ('published') ) );


### 2 Queries 
### Total time: 25, Average time: 12.5
### Taking 11 , 14  seconds to complete
### Rows analyzed 84132 and 84642
use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-07-03 22:31:27') AND ( ( post_status IN ('published') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 25;


### 2 Queries 
### Total time: 25, Average time: 12.5
### Taking 12 , 13  seconds to complete
### Rows analyzed 0 and 0
UPDATE evo_items__item
		                SET post_views = post_views + XXX
		              WHERE post_ID = XXX;

UPDATE evo_items__item
		                SET post_views = post_views + 1
		              WHERE post_ID = 28141;


### 1 Query 
### Total time: 23, Average time: 23
### Taking 23  seconds to complete
### Rows analyzed 56310
SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (EXTRACT(YEAR FROM post_datestart)=XXX) AND (EXTRACT(MONTH FROM post_datestart)=XXX) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) );

SELECT COUNT( DISTINCT post_ID)  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (EXTRACT(YEAR FROM post_datestart)=2008) AND (EXTRACT(MONTH FROM post_datestart)=6) AND (post_datestart <= '2008-06-26 04:51:46') AND ( ( post_status IN ('published') ) );


### 1 Query 
### Total time: 19, Average time: 19
### Taking 19  seconds to complete
### Rows analyzed 84453
use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND ( ( post_status IN ('XXX') ) ) ORDER BY post_views desc, post_ID desc LIMIT XXX;

use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND ( ( post_status IN ('published') ) ) ORDER BY post_views desc, post_ID desc LIMIT 12;


### 1 Query 
### Total time: 18, Average time: 18
### Taking 18  seconds to complete
### Rows analyzed 82692
use new_goedzo_com_bXXXevo;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

use new_goedzo_com_b2evo;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-06-25 01:12:29') AND ( ( post_status IN ('published') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 24;


### 1 Query 
### Total time: 16, Average time: 16
### Taking 16  seconds to complete
### Rows analyzed 56448
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (EXTRACT(YEAR FROM post_datestart)=XXX) AND (EXTRACT(MONTH FROM post_datestart)=XXX) AND (EXTRACT(DAY FROM post_datestart)=XXX) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (EXTRACT(YEAR FROM post_datestart)=2007) AND (EXTRACT(MONTH FROM post_datestart)=1) AND (EXTRACT(DAY FROM post_datestart)=1) AND (post_datestart <= '2008-06-29 04:29:38') AND ( ( post_status IN ('published') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 24;


### 1 Query 
### Total time: 15, Average time: 15
### Taking 15  seconds to complete
### Rows analyzed 112392
SELECT SQL_CALC_FOUND_ROWS EXTRACT(YEAR FROM post_datestart) AS year, MONTH(post_datestart) AS month,
																	DAYOFMONTH(post_datestart) AS day,
																	COUNT(DISTINCT postcat_post_ID) AS count  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
											INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND ( (  ( post_status = 'XXX' AND post_creator_user_ID = XXX )  OR post_status IN ('XXX','XXX','XXX','XXX','XXX') ) )
													GROUP BY year, month, day
													ORDER BY year DESC, month DESC, day DESC;

SELECT SQL_CALC_FOUND_ROWS EXTRACT(YEAR FROM post_datestart) AS year, MONTH(post_datestart) AS month,
																	DAYOFMONTH(post_datestart) AS day,
																	COUNT(DISTINCT postcat_post_ID) AS count  FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
											INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND ( (  ( post_status = 'private' AND post_creator_user_ID = 4 )  OR post_status IN ('published','protected','draft','deprecated','redirected') ) )
													GROUP BY year, month, day
													ORDER BY year DESC, month DESC, day DESC;


### 1 Query 
### Total time: 12, Average time: 12
### Taking 12  seconds to complete
### Rows analyzed 84173
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND ( (  ( post_status = 'XXX' AND post_creator_user_ID = XXX )  OR post_status IN ('XXX','XXX','XXX','XXX','XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND ( (  ( post_status = 'private' AND post_creator_user_ID = 4 )  OR post_status IN ('published','protected','draft','deprecated','redirected') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 20;


### 1 Query 
### Total time: 12, Average time: 12
### Taking 12  seconds to complete
### Rows analyzed 20
use goedzo_comweblog;
SELECT *
							FROM evo_categories
						 ORDER BY cat_name;

use goedzo_comweblog;
SELECT *
							FROM evo_categories
						 ORDER BY cat_name;


### 1 Query 
### Total time: 12, Average time: 12
### Taking 12  seconds to complete
### Rows analyzed 48
SELECT *
			              FROM evo_items__item WHERE post_ID IN (XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX,XXX)  ORDER BY post_datestart DESC, post_ID DESC;

SELECT *
			              FROM evo_items__item WHERE post_ID IN (27340,26888,25686,23867,23533,23516,23514,23513,23512,23511,23510,23509,23508,23507,23506,23505,23504,23503,23602,23502,23389,96,8871,11942)  ORDER BY post_datestart DESC, post_ID DESC;


### 1 Query 
### Total time: 11, Average time: 11
### Taking 11  seconds to complete
### Rows analyzed 20999
use goedzo_comweblog;
SELECT DISTINCT evo_comments.*
									FROM evo_comments INNER JOIN evo_items__item ON comment_post_ID = post_ID INNER JOIN evo_postcats ON post_ID = postcat_post_ID
										INNER JOIN evo_categories othercats ON postcat_cat_ID = othercats.cat_ID WHERE othercats.cat_blog_ID = XXX AND comment_type IN ('XXX')  AND comment_status IN ('XXX') AND  ( post_status IN ('XXX') ) ORDER BY comment_date DESC, comment_ID DESC LIMIT XXX;

use goedzo_comweblog;
SELECT DISTINCT evo_comments.*
									FROM evo_comments INNER JOIN evo_items__item ON comment_post_ID = post_ID INNER JOIN evo_postcats ON post_ID = postcat_post_ID
										INNER JOIN evo_categories othercats ON postcat_cat_ID = othercats.cat_ID WHERE othercats.cat_blog_ID = 1 AND comment_type IN ('comment')  AND comment_status IN ('published') AND  ( post_status IN ('published') ) ORDER BY comment_date DESC, comment_ID DESC LIMIT 25;


### 1 Query 
### Total time: 11, Average time: 11
### Taking 11  seconds to complete
### Rows analyzed 813
SELECT comment_post_ID, comment_type, comment_status, COUNT(*) AS type_count
							  FROM evo_comments
							 WHERE comment_post_ID IN (XXX)
							 GROUP BY comment_post_ID, comment_type, comment_status;

SELECT comment_post_ID, comment_type, comment_status, COUNT(*) AS type_count
							  FROM evo_comments
							 WHERE comment_post_ID IN (198)
							 GROUP BY comment_post_ID, comment_type, comment_status;


### 1 Query 
### Total time: 11, Average time: 11
### Taking 11  seconds to complete
### Rows analyzed 84265
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (post_datestart <= 'XXX') AND ( (  ( post_status = 'XXX' AND post_creator_user_ID = XXX )  OR post_status IN ('XXX','XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (post_datestart <= '2008-06-26 09:47:05') AND ( (  ( post_status = 'private' AND post_creator_user_ID = 4 )  OR post_status IN ('published','protected') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 25;


### 1 Query 
### Total time: 11, Average time: 11
### Taking 11  seconds to complete
### Rows analyzed 56890
use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = XXX) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (XXX) )) AND (EXTRACT(YEAR FROM post_datestart)=XXX) AND (EXTRACT(MONTH FROM post_datestart)=XXX) AND (post_datestart <= 'XXX') AND ( ( post_status IN ('XXX') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT XXX;

use goedzo_comweblog;
SELECT DISTINCT post_ID FROM evo_items__item INNER JOIN evo_postcats ON post_ID = postcat_post_ID
												INNER JOIN evo_categories ON postcat_cat_ID = cat_ID WHERE (cat_blog_ID = 1) AND (( post_ptyp_ID IS NULL
			                  OR post_ptyp_ID NOT IN (1000) )) AND (EXTRACT(YEAR FROM post_datestart)=2006) AND (EXTRACT(MONTH FROM post_datestart)=9) AND (post_datestart <= '2008-06-25 04:00:43') AND ( ( post_status IN ('published') ) ) ORDER BY post_datestart DESC, post_ID DESC LIMIT 20;



Form is loading...