Page MenuHomePhabricator

heavy queries from s51205, unlikely to finish?
Closed, ResolvedPublic

Description

The few hours query limits has been lifted on the new servers.
I believe some of these were ongoing in the past for over 20 hours, contributing to replication lag:

select t1.term_text AS label,count(*) as cnt from wb_terms t1 where t1.term_language='ro' and t1.term_entity_type='item' and t1.term_type='label' and not exists (SELECT * FROM wb_terms t2 WHERE t1.term_entity_id=t2.term_entity_id and t2.term_language='ro' and t2.term_entity_type='item' and t2.term_type='description') group by t1.term_text having cnt>1 order by cnt desc

SHOW EXPLAIN FOR 361978\G
*************************** 1. row ***************************
           id: 1
  select_type: PRIMARY
        table: wb_terms
         type: ref
possible_keys: tmp1,term_search_full
          key: tmp1
      key_len: 102
          ref: const,const,const
         rows: 2673416
        Extra: Using index condition; Using where; Using temporary; Using filesort
*************************** 2. row ***************************
           id: 2
  select_type: DEPENDENT SUBQUERY
        table: wb_terms
         type: index_subquery
possible_keys: wb_terms_entity_id,tmp1,term_search_full
          key: wb_terms_entity_id
      key_len: 4
          ref: func
         rows: 20
        Extra: Using where
2 rows in set, 1 warning (0.02 sec)

If not checked, the query limit will be reimposed on s51205 only.

Event Timeline

This is from the "wikidata-terminator" tool (which you could probably have found out quicker than I).

I have deactivated these update queries now. It's from the early Wikidata days, needs to be rewritten anyway.

jcrespo claimed this task.

which you could probably have found out quicker than I

Actually, maybe tools/cloud admins know how to do that, I only got your namin as the designated maintainer with the tools I know. In any case, I do not have tools access, I am just a humble DBA in charge of the databases, and know very little of how tools/cloud work, so I have to work with database names. Apologies.