At 13:15 -0500 3/10/04, Rhino wrote:
----- Original Message -----
From: "Rochester, Dean" <[EMAIL PROTECTED]>
To: "MySQL (E-mail) (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, March 10, 2004 12:35 PM
Subject: what does show status 'questions' refer to?


 in the show status there is a line that says
  Questions  and it shows a number

The manual says this is the number of questions asked the mysql database.

  what I want to know does one query equal one question or if I did the
 select * and it brought back 100 rows... does that equate to 100
questions?

I see Paul DuBois has already answered that; he's on the Documentation Team
at MySQL so he's a pretty authoritative source.

Trying to get number of hits to the database.

Maybe there is a better way to get that.

I've never seen a database that automatically tracks the number of hits to
the database. That doesn't mean that MySQL doesn't do it - maybe someone
here can answer that with 100% certainty - but I'd be a little surprised if
it did.

I'm wondering what "hits" means in the original question. If it refers to statements executed, the "Questions" value may be sufficient. If it refers to rows returned by statements, I don't believe there is a way to get that value. You can count the results from your own statements, of course, but if you connect a bunch of times all at once, each connection can count only its own statement results. And you cannot count the results from queries issued by clients that connect using other accounts.

If you're interested in statements executed, broken down by statement type,
try this:

SHOW STATUS LIKE 'Com%';

However, the Com_select value reflects only SELECT statements actually executed
by the server. If the query cache is on, some SELECT statements may be served
directly out of the query cache without the server having to execute them.
You can get the number of such queries like this:

SHOW STATUS LIKE 'Qcache_hits';

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to