Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have enabled my slow query log. So I saw the query which was taking some time then I did some indexing it improve and my slow query log is not being showing any more queies. But when I run this command

mysqladmin -u root -p status
Enter password:
Uptime: 9395  Threads: 2  Questions: 474976  Slow queries: 13  Opens: 99  Flush tables: 1  Open tables: 54  Queries per second avg: 50.556

It is showing me slow queries:13. What does the thread n questions means here?

Here is how I set my.cnf file.

    [mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 2
log_warnings = 2
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
share|improve this question

1 Answer 1

up vote 0 down vote accepted

It is since the last restart of the mysql service. If it is not growing then you are good

share|improve this answer
    
ok thx I was worried I thought is the current one. What does uptime and thread tell here? The queries-per-second is how many queries process in one second also since last start is it? –  user111196 Mar 10 '12 at 13:28
    
Good post about it: forums.mysql.com/read.php?12,86570,86570 –  Gabor Vincze Mar 10 '12 at 14:52
    
thx for link. I would like to share something with you I have a java application where I create one single database connection. Then I have like 20 different threads running which all share the single connection. Will that be a good architecture or open each different connection for each thread? –  user111196 Mar 10 '12 at 15:03
    
Is it likea connection pooling ? If yes, we use this for a long time and helps a lot, very performance effective solution –  Gabor Vincze Mar 10 '12 at 19:10
    
no is not a connection pooling just one single connection created and being share by multiple thread but I head that is dangerous if we are using transaction is it? –  user111196 Mar 11 '12 at 4:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.