Ladsgroup added a comment.

  So tendril doesn't have anything in sampled queries: 
https://tendril.wikimedia.org/report/sampled_queries?host=^db&user=wikiuser&schema=wik&hours=1
 (maybe it's not sampling from codfw?) I looked at the code in depth and found 
a couple of queries. The queries I see in the performance schema of db2083 are:
  
    SELECT `chd_site` , `chd_db` , `chd_seen` , `chd_touched` , `chd_lock` , 
`chd_disabled` , `change_time` FROM `wb_changes_dispatch` LEFT JOIN 
`wb_changes` ON ( ( `chd_seen` = `change_id` ) ) WHERE `chd_disabled` = ? ORDER 
BY `chd_seen` AS
    UPDATE `wb_changes` SET `change_type` = ? , `change_time` = ? , 
`change_object_id` = ? , `change_revision_id` = ? , `change_user_id` = ? , 
`change_info` = ? WHERE `change_id` = ?
    INSERT INTO `wb_changes` ( `change_type` , `change_time` , 
`change_object_id` , `change_revision_id` , `change_user_id` , `change_info` ) 
VALUES (...)
    SELECT MIN ( `change_id` ) AS `min_id` , MAX ( `change_id` ) AS `max_id` , 
MIN ( `change_time` ) AS `min_time` , MAX ( `change_time` ) AS `max_time` FROM 
`wb_changes` LIMIT ?
    DELETE FROM `wb_changes` WHERE ( `change_time` < ? )
    SELECT MAX ( `change_id` ) AS `maxid` FROM `wb_changes` LIMIT ?
    SELECT `change_id` , `change_type` , `change_time` , `change_object_id` , 
`change_revision_id` , `change_user_id` , `change_info` FROM `wb_changes` WHERE 
`change_id` IN (...)
    SELECT `change_id` , `change_type` , `change_time` , `change_object_id` , 
`change_revision_id` , `change_user_id` , `change_info` FROM `wb_changes` WHERE 
`change_id` = ?
    SELECT MIN ( `change_time` ) AS TIMESTAMP FROM `wb_changes_dispatch` , 
`wb_changes` WHERE `chd_disabled` = ? AND ( `chd_seen` = `change_id` ) LIMIT ?
  
  Mostly are straightforward but I actually found a query on master in the code 
that's like this (found it in performance schema of db2079 too):
  
    SELECT `change_id` , `change_type` , `change_time` , `change_object_id` , 
`change_revision_id` , `change_user_id` , `change_info` FROM `wb_changes` WHERE 
`change_revision_id` = ? LIMIT ?
  
  (With exec count of ~12,510,000 and total latency of 3150724249736000) so I 
think we need to bring back the index on revision id but the rest can be safely 
dropped.

TASK DETAIL
  https://phabricator.wikimedia.org/T262856

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Marostegui, Ladsgroup
Cc: Kormat, Marostegui, Lucas_Werkmeister_WMDE, Addshore, Aklapper, Ladsgroup, 
LSobanski, Akuckartz, Iflorez, darthmon_wmde, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, Minhnv-2809, _jensen, rosalieper, 
Scott_WUaS, Jonas, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to