Are you kidding me? 

How can I optimize or eliminate this query every time a violation sends email, 
or a verbose node lookup is done? It deadlocks for several minutes at a time. 


SELECT 
CONCAT(SUBSTRING(callingstationid,1,2),':',SUBSTRING(callingstationid,3,2),':',SUBSTRING(callingstationid,5,2),':',
 
SUBSTRING(callingstationid,7,2),':',SUBSTRING(callingstationid,9,2),':',SUBSTRING(callingstationid,11,2))
 AS mac, 
username,IF(ISNULL(acctstoptime),'connected','not connected') AS 
status,acctstarttime,acctstoptime,FORMAT(acctsessiontime/60,2) AS 
acctsessiontime, 
nasipaddress,nasportid,nasporttype,acctinputoctets AS acctoutput, 
acctoutputoctets AS acctinput,(acctinputoctets+acctoutputoctets) AS accttotal, 
IF(ISNULL(acctstoptime),'',acctterminatecause) AS acctterminatecause 
FROM (SELECT * FROM radacct ORDER BY acctstarttime DESC) AS tmp 
GROUP BY callingstationid 
HAVING callingstationid = '<mac address>'; 

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to