dbTalk Databases Forums  

Number of requests

comp.databases.mysql comp.databases.mysql


Discuss Number of requests in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Yo
 
Posts: n/a

Default Number of requests - 11-02-2010 , 04:49 AM






Hello,

I am looking for a way to know the number of requests currently running
on my mySQL database.

I found the SHOW FULL PROCESSLIST command displays the list of current
request, but I am looking for a SQL command giving the number of
requests, not the list of the requests.

Is it possible to do in SQL ? Thank you.

Reply With Quote
  #2  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Re: Number of requests - 11-02-2010 , 05:07 AM






El 02/11/2010 11:49, Yo escribió/wrote:
Quote:
Hello,

I am looking for a way to know the number of requests currently running
on my mySQL database.

I found the SHOW FULL PROCESSLIST command displays the list of current
request, but I am looking for a SQL command giving the number of
requests, not the list of the requests.

Is it possible to do in SQL ? Thank you.
If you have the appropriate permissions:

select count(*)
from information_schema.processlist



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Reply With Quote
  #3  
Old   
Yo
 
Posts: n/a

Default Re: Number of requests - 11-02-2010 , 05:14 AM



Il se trouve que "Álvaro G. Vicario" a formulé :
Quote:
El 02/11/2010 11:49, Yo escribió/wrote:
Hello,

I am looking for a way to know the number of requests currently running
on my mySQL database.

I found the SHOW FULL PROCESSLIST command displays the list of current
request, but I am looking for a SQL command giving the number of
requests, not the list of the requests.

Is it possible to do in SQL ? Thank you.

If you have the appropriate permissions:

select count(*)
from information_schema.processlist
Works perfectly, thank you !

Reply With Quote
  #4  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: Number of requests - 11-02-2010 , 05:16 AM



Yo <nomail (AT) nomail_invalid (DOT) net> wrote:
Quote:
I am looking for a way to know the number of requests currently running
on my mySQL database.

I found the SHOW FULL PROCESSLIST command displays the list of current
request, but I am looking for a SQL command giving the number of
requests, not the list of the requests.
There are counters per request type, i.e. COM_UPDATE counts the number
of processed UPDATE statements. Global counters start with 0 when the
server starts. Session counters can be cleared explicitly. RTFM!

Quote:
Is it possible to do in SQL ? Thank you.
Counters can be read with SHOW GLOBAL STATUS.

http://dev.mysql.com/doc/refman/5.1/en/show-status.html


XL

Reply With Quote
  #5  
Old   
thoughtcrimes
 
Posts: n/a

Default Re: Number of requests - 11-03-2010 , 10:53 AM



On Nov 2, 7:07*am, "Álvaro G. Vicario"
<alvaro.NOSPAMTH... (AT) demogracia (DOT) com.invalid> wrote:
Quote:
El 02/11/2010 11:49, Yo escribió/wrote:

Hello,

I am looking for a way to know the number of requests currently running
on my mySQL database.

I found the SHOW FULL PROCESSLIST command displays the list of current
request, but I am looking for a SQL command giving the number of
requests, not the list of the requests.

Is it possible to do in SQL ? Thank you.

If you have the appropriate permissions:

select count(*)
from information_schema.processlist

--
--http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://borrame.com
-- Mi web de humor satinado:http://www.demogracia.com
--
as Alvaro said, select count(*) from information_schema.processlist
will give you the number of connections.

If you are looking for only connections that are active, you can do
select count(*) from information_schema.processlist where state != ''

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.