Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-250

SLOW QUERY LOG - Group queries and check total slow query

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Fix Version/s: 10.1.2
    • Component/s: OTHER
    • Labels:
      None

      Description

      Hi again guys
      slow log is a very very good tool to know what´s running slow and change 'bad' queries
      the problem is the slow query time isn´t a fixed time in real life, it must be a dinamic value
      for example i know that i have some queries that they can´t be done more than 1 second, well what i´m talking about?

      first... a per query estimate time tweak like:
      /*estimate time=5ms*/ SELECT * FROM any_table WHERE some where that must run before 5ms

      second... a per group of queries time tweak like:
      1) /*group query time=1s*/
      2) do one query
      3) do another query
      4) do another query
      5) do another query
      6) /*end group of query slow query estimate time*/

      if 2+3+4+5+6 total time is bigger than group query time, this should be logged

      that´s very nice and very useful since a group of queries = a php or another web application page information/action and...
      only one query = a simple query information request or a update/delete/create/insert data append/change

      with this two types of query could allow a very very powerfull tool to undestand where my database is slowing down, it´s on only one query? or a group of queries that didn´t done the task in a good time?

      check that doesnt matter about cliente time to retrieve query results, just server query process time...

        Attachments

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            rspadim roberto spadim
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: