Advertisement
A248

Query Execution using applicable_bans

Feb 15th, 2022
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.72 KB | None | 0 0
  1. sql> EXPLAIN PLAN FOR select "libertybans_applicable_bans"."id", "libertybans_applicable_bans"."victim_type", "libertybans_applicable_bans"."victim_uuid", "libertybans_applicable_bans"."victim_address", "libertybans_applicable_bans"."operator", "libertybans_applicable_bans"."reason", "libertybans_applicable_bans"."scope", "libertybans_applicable_bans"."start", "libertybans_applicable_bans"."end" from "libertybans_applicable_bans" where ("libertybans_applicable_bans"."type" = 0 and "libertybans_applicable_bans"."uuid" = '98e90094-d8c8-4149-a3fd-ff39b83f98c1' and ("libertybans_applicable_bans"."end" = 0 or "libertybans_applicable_bans"."end" > 1621440000)) limit 1;
  2. isDistinctSelect=[false]
  3. isGrouped=[false]
  4. isAggregated=[false]
  5. columns=[ COLUMN: PUBLIC."libertybans_applicable_bans"."id" nullable
  6. COLUMN: PUBLIC."libertybans_applicable_bans"."victim_type" nullable
  7. COLUMN: PUBLIC."libertybans_applicable_bans"."victim_uuid" nullable
  8. COLUMN: PUBLIC."libertybans_applicable_bans"."victim_address" nullable
  9. COLUMN: PUBLIC."libertybans_applicable_bans"."operator" nullable
  10. COLUMN: PUBLIC."libertybans_applicable_bans"."reason" nullable
  11. COLUMN: PUBLIC."libertybans_applicable_bans"."scope" nullable
  12. COLUMN: PUBLIC."libertybans_applicable_bans"."start" nullable
  13. COLUMN: PUBLIC."libertybans_applicable_bans"."end" nullable
  14.  
  15. ]
  16. [range variable 1
  17. join type=INNER
  18. table=libertybans_applicable_bans
  19. cardinality=0
  20. access=INDEX PRED
  21. join condition = [index=SYS_IDX_T_10314
  22. start conditions=[
  23. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_applicable_bans"."type"
  24. ] arg_right=[
  25. VALUE = 0, TYPE = INTEGER]
  26. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_applicable_bans"."uuid"
  27. ] arg_right=[
  28. VALUE = 98e90094-d8c8-4149-a3fd-ff39b83f98c1, TYPE = UUID]]
  29. other condition=[
  30. OR arg_left=[
  31. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_applicable_bans"."end"
  32. ] arg_right=[
  33. VALUE = 0, TYPE = INTEGER]] arg_right=[
  34. GREATER arg_left=[ COLUMN: PUBLIC."libertybans_applicable_bans"."end"
  35. ] arg_right=[
  36. VALUE = 1621440000, TYPE = INTEGER]]]
  37. ]
  38. ]]
  39. offset=[
  40. VALUE = 0, TYPE = INTEGER]
  41. limit=[
  42. VALUE = 1, TYPE = INTEGER]
  43. PARAMETERS=[]
  44. SUBQUERIES[
  45. [level=1
  46. isDistinctSelect=[false]
  47. isGrouped=[false]
  48. isAggregated=[false]
  49. columns=[ COLUMN: PUBLIC."libertybans_punishments"."id" not nullable
  50. COLUMN: PUBLIC."libertybans_punishments"."type" not nullable
  51. COLUMN: PUBLIC."libertybans_victims"."type" AS victim_type not nullable
  52. COLUMN: PUBLIC."libertybans_victims"."uuid" AS victim_uuid not nullable
  53. COLUMN: PUBLIC."libertybans_victims"."address" AS victim_address not nullable
  54. COLUMN: PUBLIC."libertybans_punishments"."operator" not nullable
  55. COLUMN: PUBLIC."libertybans_punishments"."reason" not nullable
  56. COLUMN: PUBLIC."libertybans_punishments"."scope" not nullable
  57. COLUMN: PUBLIC."libertybans_punishments"."start" not nullable
  58. COLUMN: PUBLIC."libertybans_punishments"."end" not nullable
  59.  
  60. ]
  61. [range variable 1
  62. join type=INNER
  63. table=libertybans_bans
  64. alias=thetype
  65. cardinality=17
  66. access=FULL SCAN
  67. join condition = [index=SYS_IDX_10165
  68. ]
  69. ] [range variable 2
  70. join type=INNER
  71. table=libertybans_punishments
  72. alias=puns
  73. cardinality=254
  74. access=INDEX PRED
  75. join condition = [index=libertybans_punishment_id_uniqueness
  76. start conditions=[
  77. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_punishments"."id"
  78. ] arg_right=[ COLUMN: PUBLIC."libertybans_bans"."id"
  79. ]]
  80. other condition=[
  81. AND arg_left=[
  82. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_punishments"."type"
  83. ] arg_right=[
  84. VALUE = 0, TYPE = INTEGER]] arg_right=[
  85. OR arg_left=[
  86. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_punishments"."end"
  87. ] arg_right=[
  88. VALUE = 0, TYPE = INTEGER]] arg_right=[
  89. GREATER arg_left=[ COLUMN: PUBLIC."libertybans_punishments"."end"
  90. ] arg_right=[
  91. VALUE = 1621440000, TYPE = INTEGER]]]]
  92. ]
  93. ] [range variable 3
  94. join type=INNER
  95. table=libertybans_victims
  96. alias=victims
  97. cardinality=100
  98. access=INDEX PRED
  99. join condition = [index=libertybans_victim_id_uniqueness
  100. start conditions=[
  101. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_victims"."id"
  102. ] arg_right=[ COLUMN: PUBLIC."libertybans_bans"."victim"
  103. ]]
  104. ]
  105. ] ]
  106. ]
  107. [level=1
  108. isDistinctSelect=[false]
  109. isGrouped=[false]
  110. isAggregated=[false]
  111. columns=[ COLUMN: PUBLIC."libertybans_simple_bans"."id" nullable
  112. COLUMN: PUBLIC."libertybans_simple_bans"."type" nullable
  113. COLUMN: PUBLIC."libertybans_simple_bans"."victim_type" nullable
  114. COLUMN: PUBLIC."libertybans_simple_bans"."victim_uuid" nullable
  115. COLUMN: PUBLIC."libertybans_simple_bans"."victim_address" nullable
  116. COLUMN: PUBLIC."libertybans_simple_bans"."operator" nullable
  117. COLUMN: PUBLIC."libertybans_simple_bans"."reason" nullable
  118. COLUMN: PUBLIC."libertybans_simple_bans"."scope" nullable
  119. COLUMN: PUBLIC."libertybans_simple_bans"."start" nullable
  120. COLUMN: PUBLIC."libertybans_simple_bans"."end" nullable
  121. COLUMN: PUBLIC."libertybans_addresses"."uuid" not nullable
  122. COLUMN: PUBLIC."libertybans_addresses"."address" not nullable
  123.  
  124. ]
  125. [range variable 1
  126. join type=INNER
  127. table=libertybans_addresses
  128. alias=addrs
  129. cardinality=8959
  130. access=INDEX PRED
  131. join condition = [index=libertybans_uuid_address_uniqueness
  132. start conditions=[
  133. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_addresses"."uuid"
  134. ] arg_right=[
  135. VALUE = 98e90094-d8c8-4149-a3fd-ff39b83f98c1, TYPE = UUID]]
  136. ]
  137. ] [range variable 2
  138. join type=INNER
  139. table=libertybans_simple_bans
  140. alias=puns
  141. cardinality=0
  142. access=INDEX PRED
  143. join condition = [index=SYS_IDX_T_10315
  144. start conditions=[
  145. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."type"
  146. ] arg_right=[
  147. VALUE = 0, TYPE = INTEGER]]
  148. other condition=[
  149. AND arg_left=[
  150. OR arg_left=[
  151. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."end"
  152. ] arg_right=[
  153. VALUE = 0, TYPE = INTEGER]] arg_right=[
  154. GREATER arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."end"
  155. ] arg_right=[
  156. VALUE = 1621440000, TYPE = INTEGER]]] arg_right=[
  157. OR arg_left=[
  158. OR arg_left=[
  159. AND arg_left=[
  160. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."victim_type"
  161. ] arg_right=[
  162. VALUE = 0, TYPE = INTEGER]] arg_right=[
  163. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."victim_uuid"
  164. ] arg_right=[ COLUMN: PUBLIC."libertybans_addresses"."uuid"
  165. ]]] arg_right=[
  166. AND arg_left=[
  167. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."victim_type"
  168. ] arg_right=[
  169. VALUE = 1, TYPE = INTEGER]] arg_right=[
  170. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."victim_address"
  171. ] arg_right=[ COLUMN: PUBLIC."libertybans_addresses"."address"
  172. ]]]] arg_right=[
  173. AND arg_left=[
  174. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."victim_type"
  175. ] arg_right=[
  176. VALUE = 2, TYPE = INTEGER]] arg_right=[
  177. OR arg_left=[
  178. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."victim_uuid"
  179. ] arg_right=[ COLUMN: PUBLIC."libertybans_addresses"."uuid"
  180. ]] arg_right=[
  181. EQUAL arg_left=[ COLUMN: PUBLIC."libertybans_simple_bans"."victim_address"
  182. ] arg_right=[ COLUMN: PUBLIC."libertybans_addresses"."address"
  183. ]]]]]]
  184. ]
  185. ] ]
  186. ]]
  187.  
  188. Fetched 185 rows.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement