PDA

View Full Version : long_query problem


Nassou
06-27-2009, 11:31 AM
Hello everybody ;

I have some problems with long-query-log , the forum is very stable but it's not ok in the log , i explain :

I have set up this configuration on my.cnf :
# Here you can see queries with especially long duration
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 4With this configuration i don't have a lot of long_query , logs look :


Time Id Command Argument
# Time: 090627 1:00:11
# User@Host: xxx[xxx] @ localhost []
# Query_time: 6 Lock_time: 0 Rows_sent: 239788 Rows_examined: 239788
use database;
SELECT /*!40001 SQL_NO_CACHE */ * FROM `post`;
# Time: 090627 1:00:20
# User@Host: xxxx[xxxx] @ localhost []
# Query_time: 8 Lock_time: 0 Rows_sent: 3741271 Rows_examined: 3741271
SELECT /*!40001 SQL_NO_CACHE */ * FROM `postindex`;
I don't understand what this messages means.

And this is , my log error with this configuration when i added ( > log-queries-not-using-indexes ) on my.cnf

# Here you can see queries with especially long duration
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 4
log-queries-not-using-indexes
Because the log are too long , i have decided to upload this , please download the attachement file to see the log.


Some one can explain me , what can i do to resolve this problem ?

Thanks !

Cryo
06-27-2009, 02:29 PM
This isn't really a problem. Long queries are simply queries that take a longer amount of time to execute. If they're common throughout a script or site it can lead to higher loads and performance issues (among other things). Unless I'm mistaken the query above is just a vB cron job running.

Nassou
06-27-2009, 06:28 PM
This isn't really a problem. Long queries are simply queries that take a longer amount of time to execute. If they're common throughout a script or site it can lead to higher loads and performance issues (among other things). Unless I'm mistaken the query above is just a vB cron job running.
Yes but these query surcharge a little my server !

Then i want to optimize this !

Cryo
06-27-2009, 07:00 PM
What plugins do you have installed on your forum?

snakes1100
06-27-2009, 07:10 PM
You can do away with postindex by switching to the MySQL FULLTEXT options in the search type in vb's admincp, tick the option to empty postindex when converting.

This should also eliminate the other query as well as the post table wont need to be scanned to sync the vb default search.

Nassou
06-28-2009, 10:01 PM
You can do away with postindex by switching to the MySQL FULLTEXT options in the search type in vb's admincp, tick the option to empty postindex when converting.

This should also eliminate the other query as well as the post table wont need to be scanned to sync the vb default search.
i don't know if i can say this , but who is better MYSQL FULL TEXT Or Default vBulletin INDEX?