WorkLog Frontpage Log in / Register
High-Level Description | Task Dependencies | High-Level Specification | Low-Level Design | File Attachments | User Comments | Time Estimates | Funding and Votes | Progress Reports

 Query logging
Title
Task ID181
Queue
Version N/A
Status
PriorityN/A
Copies toSergei

Created byMdcallag13 Mar 2011Done
Supervisor N/A  
Lead Architect    
Architecture Review  
Implementor  
Code Review  
QA  
Documentation  
 High-Level Description
I want options to log some queries on the server side using the slow query log 
format. The initial options are:
* statement sample rate -- sets percentage of queries to be logged, a value 
between 0 and 100
* transaction sample rate -- sets percentage of transactions to be logged, a 
value between 0 and 100. In this case all statements in the transaction are to 
be logged.

This should also support the equivalent of --log-slow-extra from the Facebook 
patch or the Percona equivalent and log extra attributes into the slow query 
log. See http://www.facebook.com/note.php?note_id=390420710932 for some details 
on that. There are many interesting counters from SHOW SESSION STATUS that can 
be logged. The only problem is that those are per-connection not per-statement 
values. There are also interesting counters from the new code added for 
information_schema.{user_statistics, table_statistics} that can also be written 
as attributes (including innodb disk reads per query).

Eventually this might need options to not log queries for some users, but I 
don't want to put that in the first version of this feature.

The facebook patch has this code for "statement sample rate" but that change is 
trivial and for MariaDB using the audit plugin infrastructure and a new file 
(not the current slow query log) is likely to be a better choice. There is some 
useful code in the FB patch that provides more data that can be logged.
 Task Dependencies
Others waiting for Task 181Task 181 is waiting forGraph
 
 High-Level Specification
 Low-Level Design
 File Attachments
 NameTypeSizeByDate
 User Comments
 Time Estimates
NameHours WorkedLast Updated
Total0 
 Hrs WorkedProgressCurrentOriginal
Total000
 
 Funding and Votes
Votes: 0: 0%
 Make vote: Useless    Nice to have    Important    Very important    

Funding: 0 offers, total 0 Euro
 Progress Reports
(Sergei - Mon, 04 Apr 2011, 11:12
    
Category updated.
--- /tmp/wklog.181.old.25544	2011-04-04 11:12:59.000000000 +0000
+++ /tmp/wklog.181.new.25544	2011-04-04 11:12:59.000000000 +0000
@@ -1,2 +1,2 @@
-WorkLog-RawIdeaBin
+Server-RawIdeaBin
 

(Sergei - Mon, 04 Apr 2011, 11:12
    
Version updated.
--- /tmp/wklog.181.old.25544	2011-04-04 11:12:59.000000000 +0000
+++ /tmp/wklog.181.new.25544	2011-04-04 11:12:59.000000000 +0000
@@ -1,2 +1,2 @@
-WorkLog-4.0
+9.x
 

(Sergei - Tue, 22 Mar 2011, 14:18
    
Observers changed: Sergei


Report Generator:
 
Saved Reports:

WorkLog v4.0.0
  © 2010  Sergei Golubchik and Monty Program AB
  © 2004  Andrew Sweger <yDNA@perlocity.org> and Addnorya
  © 2003  Matt Wagner <matt@mysql.com> and MySQL AB