Mysql – format of thesql query log

MySQLperformanceslow-log

What is the format of the mysql query log? In particular, for lines like:

133 Query     commit
133 Query     rollback

What does '133' stand for? And is it true that each line represents a round trip communication to the database (i.e., they are not batched)?

Best Answer

A typical general log format looks like this:

Time              Id Command    Argument
110208 12:12:06   771 Query rollback

Multiple queries can appear at particular time-stamp also ID indicates MySQL connection thread id which has executed a query Command of type "Query" which indicates query has been executed and Argument is actually a query itself.