User:Jeroen De Dauw/debug

From semantic-mediawiki.org
Jump to: navigation, search
Jeroen De DauwUser:Jeroen De Dauw/debug

Disjunction

SQLStore debug output
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_sortkey
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_sortkey ASC
LIMIT
  55
OFFSET
  0
SQL Explain
IDselect_typetabletypepossible_keyskeykey_lenrefrowsExtra
1SIMPLEt1ALLPRIMARY24Using temporary; Using filesort
1SIMPLEt0eq_refPRIMARY,smw_id,smw_iwPRIMARY4DB0231020151216.t1.id1Using where
Auxilliary Tables
  • Temporary table t1
      INSERT IGNORE INTO `t1` SELECT DISTINCT t2.s_id FROM `smw_fpt_inst` AS t2 WHERE t2.o_id='14629'
      INSERT IGNORE INTO `t1` SELECT DISTINCT t4.s_id FROM `smw_di_wikipage` AS t4 WHERE t4.p_id='253' AND t4.o_id='7236'
Query Metrics
Query-Size:3
Query-Depth:1
Errors and Warnings
None

Nested disjunctions

SQLStore debug output
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_sortkey
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_sortkey ASC
LIMIT
  55
OFFSET
  0
SQL Explain
IDselect_typetabletypepossible_keyskeykey_lenrefrowsExtra
1SIMPLEt1ALLPRIMARY28Using temporary; Using filesort
1SIMPLEt0eq_refPRIMARY,smw_id,smw_iwPRIMARY4DB0231020151216.t1.id1Using where
Auxilliary Tables
  • Temporary table t1
      INSERT IGNORE INTO `t1` SELECT DISTINCT t2.s_id FROM `smw_fpt_inst` AS t2 WHERE t2.o_id='14629'
      INSERT IGNORE INTO `t1` SELECT DISTINCT t4.s_id FROM `smw_di_wikipage` AS t4 WHERE t4.p_id='253' AND t4.o_id='7236'
      INSERT IGNORE INTO `t1` SELECT DISTINCT t7.s_id FROM `smw_di_wikipage` AS t7 WHERE t7.p_id='85' AND t7.o_id='798'
      INSERT IGNORE INTO `t1` SELECT DISTINCT t10.s_id FROM `smw_di_wikipage` AS t10 WHERE t10.p_id='253' AND t10.o_id='779'
Query Metrics
Query-Size:7
Query-Depth:1
Errors and Warnings
None

Disjunctions in a conjunction

SQLStore debug output
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_sortkey
FROM
  `smw_object_ids` AS t0
INNER JOIN
  `t8` AS t8 ON t0.smw_id=t8.id
INNER JOIN
  `t2` AS t2 ON t8.id=t2.id
WHERE
  t0.smw_iw!=':smw'
  AND t0.smw_iw!=':smw-delete'
  AND t0.smw_iw!=':smw-redi'
ORDER BY
  t0.smw_sortkey ASC
LIMIT
  55
OFFSET
  0
SQL Explain
IDselect_typetabletypepossible_keyskeykey_lenrefrowsExtra
1SIMPLEt8ALLPRIMARY4Using temporary; Using filesort
1SIMPLEt2eq_refPRIMARYPRIMARY4DB0231020151216.t8.id1
1SIMPLEt0eq_refPRIMARY,smw_id,smw_iwPRIMARY4DB0231020151216.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='85' AND t9.o_id='798'
      INSERT IGNORE INTO `t8` SELECT DISTINCT t12.s_id FROM `smw_di_wikipage` AS t12 WHERE t12.p_id='253' AND t12.o_id='779'
  • Temporary table t2
      INSERT IGNORE INTO `t2` SELECT DISTINCT t3.s_id FROM `smw_fpt_inst` AS t3 WHERE t3.o_id='14629'
      INSERT IGNORE INTO `t2` SELECT DISTINCT t5.s_id FROM `smw_di_wikipage` AS t5 WHERE t5.p_id='253' AND t5.o_id='7236'
Query Metrics
Query-Size:7
Query-Depth:1
Errors and Warnings
None