Support » Plugin: Activity Log » Slow Query

  • This database query is dead slow not using indexes. This is currently resulting in full table scans. That means it is increasingly slow with a growing wp_aryo_activity_log table.

    It is likely a good idea to add an index, which can speed it up significantly (any select should be processed in microseconds, not seconds).

    # Time: 201101  4:34:25
    # User@Host: mydb[mydb] @ localhost []
    # Thread_id: 29108208  Schema: mydb  QC_hit: No
    # Query_time: 1.035174  Lock_time: 0.000088  Rows_sent: 0  Rows_examined: 1900398
    # Rows_affected: 0  Bytes_sent: 111
    # Full_scan: Yes  Full_join: No  Tmp_table: No  Tmp_table_on_disk: No
    # Filesort: No  Filesort_on_disk: No  Merge_passes: 0  Priority_queue: No
    #
    # explain: id   select_type     table   type    possible_keys   key     key_len ref     rows    r_rows  filtered        r_filtered      Extra
    # explain: 1    SIMPLE  wp_aryo_activity_log    ALL     NULL    NULL    NULL    NULL    1885490 1900398.00      100.00  0.00    Using where
    #
    SET timestamp=1604223265;
    SELECT histid 
    FROM wp_aryo_activity_log
    WHERE user_caps = 'guest'
     AND action = 'wrong_password'
     AND object_type = 'User'
     AND object_subtype = ''
     AND object_name = 'frank-henry'
     AND user_id = '0'
     AND hist_ip = '192.168.0.1'
     AND hist_time = '1604194464';
    
    • This topic was modified 10 months, 4 weeks ago by erlendeide.
    • This topic was modified 10 months, 4 weeks ago by erlendeide.
  • The topic ‘Slow Query’ is closed to new replies.