User:Jeroen De Dauw/debug

From semantic-mediawiki.org
< Jeroen De Dauw
Jeroen De DauwUser:Jeroen De Dauw/debug

Disjunction[edit]

Debug output SQLStore
ASK Query
[[Category:API]] OR [[Country::China]]
SQL Query
SELECT DISTINCT
  t0.smw_id AS id,
  t0.smw_title AS t,
  t0.smw_namespace AS ns,
  t0.smw_iw AS iw,
  t0.smw_subobject AS so,
  t0.smw_sortkey AS sortkey, t0.smw_sort
FROM
  `smw_object_ids` AS t0
INNER JOIN
  `t1` AS t1 ON t0.smw_id=t1.id
WHERE
  t0.smw_iw!=':smw'
  AND t0.smw_iw!=':smw-delete'
  AND t0.smw_iw!=':smw-redi'
ORDER BY
  t0.smw_sort ASC
LIMIT
  55
OFFSET
  0
SQL Explain
IDselect_typetabletypepossible_keyskeykey_lenrefrowsfilteredExtra
1SIMPLEt1ALLPRIMARY42Using temporary; Using filesort
1SIMPLEt0eq_refPRIMARY, smw_id, smw_iw, smw_iw_2PRIMARY4DB9907220070920.t1.id1Using where
Auxilliary Tables
  • Temporary table t1
      INSERT IGNORE INTO `t1` SELECT DISTINCT t2.s_id FROM `smw_fpt_inst` AS t2 INNER JOIN `t3` AS t3 ON t2.o_id=t3.id
      INSERT IGNORE INTO `t1` SELECT DISTINCT t4.s_id FROM `smw_di_wikipage` AS t4 WHERE t4.p_id='148394' AND t4.o_id='7236'
  • Temporary table t3
      Recursively computed hierarchy for element(s) ('14629').
      SELECT s_id FROM `smw_fpt_subc` WHERE o_id='14629' LIMIT 1
Query Metrics
Query-Size:3
Query-Depth:1
Errors and Warnings
None

Nested disjunctions[edit]

Debug output SQLStore
ASK Query
[[Category:API]] OR [[Country::China]] OR [[Capital of::France]] OR [[Country::Germany]]
SQL Query
SELECT DISTINCT
  t0.smw_id AS id,
  t0.smw_title AS t,
  t0.smw_namespace AS ns,
  t0.smw_iw AS iw,
  t0.smw_subobject AS so,
  t0.smw_sortkey AS sortkey, t0.smw_sort
FROM
  `smw_object_ids` AS t0
INNER JOIN
  `t1` AS t1 ON t0.smw_id=t1.id
WHERE
  t0.smw_iw!=':smw'
  AND t0.smw_iw!=':smw-delete'
  AND t0.smw_iw!=':smw-redi'
ORDER BY
  t0.smw_sort ASC
LIMIT
  55
OFFSET
  0
SQL Explain
IDselect_typetabletypepossible_keyskeykey_lenrefrowsfilteredExtra
1SIMPLEt1ALLPRIMARY66Using temporary; Using filesort
1SIMPLEt0eq_refPRIMARY, smw_id, smw_iw, smw_iw_2PRIMARY4DB9907220070920.t1.id1Using where
Auxilliary Tables
  • Temporary table t1
      INSERT IGNORE INTO `t1` SELECT DISTINCT t2.s_id FROM `smw_fpt_inst` AS t2 INNER JOIN `t3` AS t3 ON t2.o_id=t3.id
      INSERT IGNORE INTO `t1` SELECT DISTINCT t4.s_id FROM `smw_di_wikipage` AS t4 WHERE t4.p_id='148394' AND t4.o_id='7236'
      INSERT IGNORE INTO `t1` SELECT DISTINCT t7.s_id FROM `smw_di_wikipage` AS t7 WHERE t7.p_id='148243' AND t7.o_id='798'
      INSERT IGNORE INTO `t1` SELECT DISTINCT t10.s_id FROM `smw_di_wikipage` AS t10 WHERE t10.p_id='148394' AND t10.o_id='779'
  • Temporary table t3
      Recursively computed hierarchy for element(s) ('14629').
      SELECT s_id FROM `smw_fpt_subc` WHERE o_id='14629' LIMIT 1
Query Metrics
Query-Size:7
Query-Depth:1
Errors and Warnings
None

Disjunctions in a conjunction[edit]

Debug output SQLStore
ASK Query
[[Category:API]] OR [[Country::China]] [[Capital of::France]] OR [[Country::Germany]]
SQL Query
SELECT DISTINCT
  t0.smw_id AS id,
  t0.smw_title AS t,
  t0.smw_namespace AS ns,
  t0.smw_iw AS iw,
  t0.smw_subobject AS so,
  t0.smw_sortkey AS sortkey, t0.smw_sort
FROM
  `smw_object_ids` AS t0
INNER JOIN
  (`t8` AS t8
INNER JOIN
  `t2` AS t2 ON t8.id=t2.id) ON t0.smw_id=t8.id
WHERE
  t0.smw_iw!=':smw'
  AND t0.smw_iw!=':smw-delete'
  AND t0.smw_iw!=':smw-redi'
ORDER BY
  t0.smw_sort ASC
LIMIT
  55
OFFSET
  0
SQL Explain
IDselect_typetabletypepossible_keyskeykey_lenrefrowsfilteredExtra
1SIMPLEt8ALLPRIMARY24Using temporary; Using filesort
1SIMPLEt2eq_refPRIMARYPRIMARY4DB9907220070920.t8.id1
1SIMPLEt0eq_refPRIMARY, smw_id, smw_iw, smw_iw_2PRIMARY4DB9907220070920.t8.id1Using where
Auxilliary Tables
  • Temporary table t8
      INSERT IGNORE INTO `t8` SELECT DISTINCT t9.s_id FROM `smw_di_wikipage` AS t9 WHERE t9.p_id='148243' AND t9.o_id='798'
      INSERT IGNORE INTO `t8` SELECT DISTINCT t12.s_id FROM `smw_di_wikipage` AS t12 WHERE t12.p_id='148394' AND t12.o_id='779'
  • Temporary table t2
      INSERT IGNORE INTO `t2` SELECT DISTINCT t3.s_id FROM `smw_fpt_inst` AS t3 INNER JOIN `t4` AS t4 ON t3.o_id=t4.id
      INSERT IGNORE INTO `t2` SELECT DISTINCT t5.s_id FROM `smw_di_wikipage` AS t5 WHERE t5.p_id='148394' AND t5.o_id='7236'
  • Temporary table t4
      Recursively computed hierarchy for element(s) ('14629').
      SELECT s_id FROM `smw_fpt_subc` WHERE o_id='14629' LIMIT 1
Query Metrics
Query-Size:7
Query-Depth:1
Errors and Warnings
None