[rt-users] RT query for test InnoDB performance

Francesco Dalla Ca' f.dallaca at cineca.it
Mon Jan 16 10:34:12 EST 2006


Goddard Lee wrote:

>Why not perform a query and look in the MySQL logs?
>
>lee
>
>  
>
I have  slow_query_log enabled and long_query_time set to 2 seconds, but 
in the slow_query_log and i see only these kind of queries:

...
# Time: 060116 15:47:48
# User at Host: rt_user[rt_user] @ localhost []
# Query_time: 14  Lock_time: 0  Rows_sent: 1  Rows_examined: 431514
SELECT COUNT(DISTINCT main.id) FROM Tickets main , Transactions 
Transactions_1, Attachments Attachments_2  WHERE 
((Transactions_1.ObjectType = 'RT::Ticket')) AND ((main.EffectiveId = 
main.id)) AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) 
AND ( ( (Attachments_2.Content LIKE 
'%asphi%')AND(Attachments_2.TransactionId = 
Transactions_1.id)AND(main.id = Transactions_1.ObjectId) ) );
...
...
# Time: 060116 15:48:20
# User at Host: rt_user[rt_user] @ localhost []
# Query_time: 9  Lock_time: 0  Rows_sent: 1  Rows_examined: 0
SELECT GET_LOCK('Apache-Session-3f0ef2437ba7edab8e662b7028693416', 3600);
...
...
# Time: 060116 15:48:51
# User at Host: rt_user[rt_user] @ localhost []
# Query_time: 14  Lock_time: 0  Rows_sent: 4  Rows_examined: 431347
SELECT DISTINCT main.* FROM Tickets main , Transactions Transactions_1, 
Attachments Attachments_2  WHERE ((Transactions_1.ObjectType = 
'RT::Ticket')) AND ((main.EffectiveId = main.id)) AND ((main.Status != 
'deleted')) AND ((main.Type = 'ticket')) AND ( ( (Attachments_2.Content 
LIKE '%asphi%')AND(Attachments_2.TransactionId = 
Transactions_1.id)AND(main.id = Transactions_1.ObjectId) ) )  ORDER BY 
main.id ASC;
...

I don't use general log (for security reasons).
I'm searching for a tipical query that involves "Queues" and 
"ObjectCustomFieldValues" tables. There's a way to see the SQL from the 
Query Browser?

Thank in advance.
Francesco.

-- 
--------------------------------------------------
Francesco Dalla Ca'
Settore Gestione Sistemi CINECA
Via Magnanelli 6/3  40033 Casalecchio di Reno (BO)
Bologna, Italy     
http://www.cineca.it
-------------------------------------------------- 




More information about the rt-users mailing list