https://bugzilla.wikimedia.org/show_bug.cgi?id=35028

--- Comment #8 from Antoine "hashar" Musso <[email protected]> 2012-05-02 14:21:19 
UTC ---
Query plan for first query:

explain SELECT run_id, client_id, useragent_id FROM run_client, clients WHERE
DATE_ADD(run_client.updated, INTERVAL 5 MINUTE) < NOW() AND clients.id =
client_id AND run_client.status = 1 \G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: run_client
         type: ALL
possible_keys: idx_run_client_client_id
          key: NULL
      key_len: NULL
          ref: NULL
         rows: 537930
        Extra: Using where
*************************** 2. row ***************************
           id: 1
  select_type: SIMPLE
        table: clients
         type: eq_ref
possible_keys: PRIMARY
          key: PRIMARY
      key_len: 4
          ref: testswarm.run_client.client_id
         rows: 1
        Extra: 
2 rows in set (0.00 sec)


`run_client` table having 440k rows, only one of them having status == 1 right
now. So maybe the`run_client` table could use an index on `status` ?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to