User:Jeroen De Dauw/debug

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

Disjunction

Debug Output by SQLStore

Ask query

[[Category:API]] OR [[Country::China]]

SQL Query

SELECT DISTINCT
  t6.smw_id AS id,t6.smw_title AS t,t6.smw_namespace AS ns,t6.smw_iw AS iw,t6.smw_subobject AS so,t6.smw_sortkey AS sortkey
FROM
  `smw_object_ids` AS t6
INNER JOIN
  `t0` AS t0 ON t6.smw_id=t0.id
WHERE
  t6.smw_iw!=':smw' AND t6.smw_iw!=':smw-delete' AND t6.smw_iw!=':smw-redi'
ORDER BY
  t6.smw_sortkey ASC
LIMIT
  55
OFFSET
  0

SQL Explain

IDselect_typetabletypepossible_keyskeykey_lenrefrowsExtra
1SIMPLEt0ALLPRIMARY17Using temporary; Using filesort
1SIMPLEt6eq_refPRIMARY,smw_id,smw_iwPRIMARY4DB0231020151216.t0.id1Using where

Auxilliary Tables Used

  • Temporary table t0
      INSERT IGNORE INTO `t0` SELECT DISTINCT t1.s_id FROM `smw_fpt_inst` AS t1 WHERE t1.o_id='14629'
      INSERT IGNORE INTO `t0` SELECT DISTINCT t3.s_id FROM `smw_di_wikipage` AS t3 WHERE t3.p_id='253' AND t3.o_id='7236'

Query Metrics

Query-Size:3
Query-Depth:1

Errors and Warnings

None

Nested disjunctions

Debug Output by SQLStore

Ask query

[[Category:API]] OR [[Country::China]] OR [[Capital of::France]] OR [[Country::Germany]]

SQL Query

SELECT DISTINCT
  t12.smw_id AS id,t12.smw_title AS t,t12.smw_namespace AS ns,t12.smw_iw AS iw,t12.smw_subobject AS so,t12.smw_sortkey AS sortkey
FROM
  `smw_object_ids` AS t12
INNER JOIN
  `t0` AS t0 ON t12.smw_id=t0.id
WHERE
  t12.smw_iw!=':smw' AND t12.smw_iw!=':smw-delete' AND t12.smw_iw!=':smw-redi'
ORDER BY
  t12.smw_sortkey ASC
LIMIT
  55
OFFSET
  0

SQL Explain

IDselect_typetabletypepossible_keyskeykey_lenrefrowsExtra
1SIMPLEt0ALLPRIMARY21Using temporary; Using filesort
1SIMPLEt12eq_refPRIMARY,smw_id,smw_iwPRIMARY4DB0231020151216.t0.id1Using where

Auxilliary Tables Used

  • Temporary table t0
      INSERT IGNORE INTO `t0` SELECT DISTINCT t1.s_id FROM `smw_fpt_inst` AS t1 WHERE t1.o_id='14629'
      INSERT IGNORE INTO `t0` SELECT DISTINCT t3.s_id FROM `smw_di_wikipage` AS t3 WHERE t3.p_id='253' AND t3.o_id='7236'
      INSERT IGNORE INTO `t0` SELECT DISTINCT t6.s_id FROM `smw_di_wikipage` AS t6 WHERE t6.p_id='85' AND t6.o_id='798'
      INSERT IGNORE INTO `t0` SELECT DISTINCT t9.s_id FROM `smw_di_wikipage` AS t9 WHERE t9.p_id='253' AND t9.o_id='779'

Query Metrics

Query-Size:7
Query-Depth:1

Errors and Warnings

None

Disjunctions in a conjunction

Debug Output by SQLStore

Ask query

[[Category:API]] OR [[Country::China]] [[Capital of::France]] OR [[Country::Germany]]

SQL Query

SELECT DISTINCT
  t14.smw_id AS id,t14.smw_title AS t,t14.smw_namespace AS ns,t14.smw_iw AS iw,t14.smw_subobject AS so,t14.smw_sortkey AS sortkey
FROM
  `smw_object_ids` AS t14
INNER JOIN
  `t7` AS t7 ON t14.smw_id=t7.id
INNER JOIN
  `t1` AS t1 ON t7.id=t1.id
WHERE
  t14.smw_iw!=':smw' AND t14.smw_iw!=':smw-delete' AND t14.smw_iw!=':smw-redi'
ORDER BY
  t14.smw_sortkey ASC
LIMIT
  55
OFFSET
  0

SQL Explain

IDselect_typetabletypepossible_keyskeykey_lenrefrowsExtra
1SIMPLEt7ALLPRIMARY4Using temporary; Using filesort
1SIMPLEt1eq_refPRIMARYPRIMARY4DB0231020151216.t7.id1
1SIMPLEt14eq_refPRIMARY,smw_id,smw_iwPRIMARY4DB0231020151216.t7.id1Using where

Auxilliary Tables Used

  • Temporary table t7
      INSERT IGNORE INTO `t7` SELECT DISTINCT t8.s_id FROM `smw_di_wikipage` AS t8 WHERE t8.p_id='85' AND t8.o_id='798'
      INSERT IGNORE INTO `t7` SELECT DISTINCT t11.s_id FROM `smw_di_wikipage` AS t11 WHERE t11.p_id='253' AND t11.o_id='779'
  • 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:7
Query-Depth:1

Errors and Warnings

None