Page MenuHomePhabricator
Paste P5988

(An Untitled Masterwork)
ActivePublic

Authored by jcrespo on Sep 12 2017, 9:28 AM.
Tags
None
Referenced Files
F9477831:
Sep 12 2017, 9:28 AM
Subscribers
None
```
root@db1084.eqiad.wmnet[commonswiki]> explain SELECT STRAIGHT_JOIN rc_id FROM `recentchanges` INNER JOIN `watchlist` ON (wl_user = '611' AND (wl_namespace=rc_namespace) AND (wl_title=rc_title)) LEFT JOIN `page` ON ((rc_cur_id=page_id)) WHERE (rc_type != '6') AND (rc_source != 'wb') AND ((rc_this_oldid=page_latest) OR rc_type IN ('3','142') ) AND (rc_id > 912664338) AND ((rc_type != 3) OR ((rc_deleted & 9) != 9)) ORDER BY rc_id DESC LIMIT 60 \G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: recentchanges
type: range
possible_keys: PRIMARY,rc_namespace_title,rc_ns_usertext,tmp_3,rc_name_type_patrolled_timestamp
key: PRIMARY
key_len: 4
ref: NULL
rows: 37613059
Extra: Using where
*************************** 2. row ***************************
id: 1
select_type: SIMPLE
table: watchlist
type: eq_ref
possible_keys: wl_user,namespace_title,wl_user_notificationtimestamp
key: wl_user
key_len: 265
ref: const,commonswiki.recentchanges.rc_namespace,commonswiki.recentchanges.rc_title
rows: 1
Extra: Using index
*************************** 3. row ***************************
id: 1
select_type: SIMPLE
table: page
type: eq_ref
possible_keys: PRIMARY
key: PRIMARY
key_len: 4
ref: commonswiki.recentchanges.rc_cur_id
rows: 1
Extra: Using where
```

Event Timeline

root@dbstore1002[commonswiki]> explain   SELECT STRAIGHT_JOIN rc_id  FROM `recentchanges` INNER JOIN `watchlist` ON (wl_user = '611' AND (wl_namespace=rc_namespace) AND (wl_title=rc_title)) LEFT JOIN `page` ON ((rc_cur_id=page_id))   WHERE (rc_type != '6') AND (rc_source != 'wb') AND ((rc_this_oldid=page_latest) OR rc_type IN ('3','142') ) AND (rc_id > 912664338) AND ((rc_type != 3) OR ((rc_deleted & 9) != 9))  ORDER BY rc_timestamp DESC LIMIT 60 \G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: recentchanges
         type: index
possible_keys: PRIMARY,rc_namespace_title,rc_ns_usertext,tmp_3,rc_name_type_patrolled_timestamp
          key: rc_timestamp
      key_len: 16
          ref: NULL
         rows: 120
        Extra: Using where
*************************** 2. row ***************************
           id: 1
  select_type: SIMPLE
        table: watchlist
         type: eq_ref
possible_keys: wl_user,namespace_title,wl_user_notificationtimestamp
          key: wl_user
      key_len: 265
          ref: const,commonswiki.recentchanges.rc_namespace,commonswiki.recentchanges.rc_title
         rows: 1
        Extra: Using index
*************************** 3. row ***************************
           id: 1
  select_type: SIMPLE
        table: page
         type: eq_ref
possible_keys: PRIMARY
          key: PRIMARY
      key_len: 4
          ref: commonswiki.recentchanges.rc_cur_id
         rows: 1
        Extra: Using where
3 rows in set (0.00 sec)