Page MenuHomePhabricator

EXPLAIN query
Closed, ResolvedPublic

Description

Howdy. I have an oddly slow-running query; can I request someone with relevant permissions EXPLAIN the query below on enwiki.labsdb please?

SELECT count(1) AS 'howmany'
FROM enwiki_p.pagelinks l
INNER JOIN p50380g50491_rlrl_enwiki.suggestions s ON

l.pl_namespace = s.sug_orig_ns AND l.pl_title = s.sug_orig

WHERE l.pl_from = 38136839
AND s.sug_status >= 0;


Version: unspecified
Severity: minor
Whiteboard: aklapper-moreinfo

Details

Reference
bz57703

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:27 AM
bzimport added a project: Toolforge.
bzimport set Reference to bz57703.

Hi tb,
unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please read https://www.mediawiki.org/wiki/How_to_report_a_bug and add a more useful description to this report by describing what the bug is, and/or what "slow" exactly means, plus what you want to see "explained" here.

(In reply to comment #1)

Hi tb,
unfortunately this report is not very useful because it does not describe the
problem well. If you have time and can still reproduce the problem, please
read
https://www.mediawiki.org/wiki/How_to_report_a_bug and add a more useful
description to this report by describing what the bug is, and/or what "slow"
exactly means, plus what you want to see "explained" here.

EXPLAIN is a MySQL function.

Apologies if my initial report was unclear. Per bug #48875, it is not possible for tool labs end users to use the MariaDB EXPLAIN facility. One of my tools is running more slowly that I expected; I have tracked this down to a particular SQL query it.

I am requesting that someone with relevant permissions connect to enwiki.labsdb, execute the command below and return the result to me please. This should (hopefully) give me the information I need to resolve the problem.

EXPLAIN SELECT count(1) AS 'howmany'
FROM enwiki_p.pagelinks l
INNER JOIN p50380g50491_rlrl_enwiki.suggestions s ON

l.pl_namespace = s.sug_orig_ns AND l.pl_title = s.sug_orig

WHERE l.pl_from = 38136839
AND s.sug_status >= 0;

  • 1. row ******* id: 1 select_type: SIMPLE table: pagelinks type: ref

possible_keys: pl_from,pl_namespace

     key: pl_from
 key_len: 4
     ref: const
    rows: 1205
filtered: 100.00
   Extra: Using index
  • 2. row ******* id: 1 select_type: SIMPLE table: s type: ref

possible_keys: PRIMARY,sug_orig

     key: PRIMARY
 key_len: 4
     ref: enwiki.pagelinks.pl_namespace
    rows: 151
filtered: 100.00
   Extra: Using where