Announcement Module
No announcement yet.

enable profiling for a specific user/session

Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • enable profiling for a specific user/session


    I have had problems with some sqls generated by an specific user used in an application.

    is there a way to enable profiling to that user since my session?

    I have enable slow query option and queries not using index but i want to know if i can enable profiling? Or how can i know the resource usage for statements executed during the course of that session.

    Thanks for your help.

  • #2
    If you use Percona Server you can track usage based on users using INFORMATION_SCHEMA.USER_STATISTICS.

    You can use the slow query log. If you are using MySQL 5.1 (or Percona Server 5.0) you can log all queries to the log by setting long_query_time to 0.

    You can use mk-query-digest to process the log, and the --filter functionality to look at queries only for a particular user.