github.com/whtcorpsinc/milevadb-prod@v0.0.0-20211104133533-f57f4be3b597/dbs/memristed/memex/testdata/partition_pruner_out.json (about) 1 [ 2 { 3 "Name": "TestHashPartitionPruner", 4 "Cases": [ 5 { 6 "ALLEGROALLEGROSQL": "explain select * from t1 where id = 7 and a = 6", 7 "Result": [ 8 "BlockReader_7 0.00 root partition:p7 data:Selection_6", 9 "└─Selection_6 0.00 cop[einsteindb] eq(test_partition.t1.a, 6)", 10 " └─BlockRangeScan_5 1.00 cop[einsteindb] causet:t1 range:[7,7], keep order:false, stats:pseudo" 11 ] 12 }, 13 { 14 "ALLEGROALLEGROSQL": "explain select * from t3 where id = 9 and a = 1", 15 "Result": [ 16 "Point_Get_1 1.00 root causet:t3, partition:p9, index:PRIMARY(id, a) " 17 ] 18 }, 19 { 20 "ALLEGROALLEGROSQL": "explain select * from t2 where id = 9 and a = -110", 21 "Result": [ 22 "IndexLookUp_7 1.00 root partition:p1 ", 23 "├─IndexRangeScan_5(Build) 1.00 cop[einsteindb] causet:t2, index:PRIMARY(id, a) range:[9 -110,9 -110], keep order:false, stats:pseudo", 24 "└─BlockEventIDScan_6(Probe) 1.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 25 ] 26 }, 27 { 28 "ALLEGROALLEGROSQL": "explain select * from t1 where id = -17", 29 "Result": [ 30 "BlockReader_6 1.00 root partition:p7 data:BlockRangeScan_5", 31 "└─BlockRangeScan_5 1.00 cop[einsteindb] causet:t1 range:[-17,-17], keep order:false, stats:pseudo" 32 ] 33 }, 34 { 35 "ALLEGROALLEGROSQL": "explain select * from t1 join t2 on (t1.id = t2.id) where t1.id = 5 and t2.a = 7", 36 "Result": [ 37 "HashJoin_8 1.00 root CARTESIAN inner join", 38 "├─IndexLookUp_14(Build) 1.00 root partition:p2 ", 39 "│ ├─IndexRangeScan_12(Build) 1.00 cop[einsteindb] causet:t2, index:PRIMARY(id, a) range:[5 7,5 7], keep order:false, stats:pseudo", 40 "│ └─BlockEventIDScan_13(Probe) 1.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 41 "└─BlockReader_11(Probe) 1.00 root partition:p5 data:BlockRangeScan_10", 42 " └─BlockRangeScan_10 1.00 cop[einsteindb] causet:t1 range:[5,5], keep order:false, stats:pseudo" 43 ] 44 }, 45 { 46 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.id = 1 and t2.a = 2 where t2.id = 7", 47 "Result": [ 48 "HashJoin_7 1.00 root CARTESIAN inner join", 49 "├─IndexLookUp_13(Build) 1.00 root partition:p9 ", 50 "│ ├─IndexRangeScan_11(Build) 1.00 cop[einsteindb] causet:t2, index:PRIMARY(id, a) range:[7 2,7 2], keep order:false, stats:pseudo", 51 "│ └─BlockEventIDScan_12(Probe) 1.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 52 "└─BlockReader_10(Probe) 1.00 root partition:p1 data:BlockRangeScan_9", 53 " └─BlockRangeScan_9 1.00 cop[einsteindb] causet:t1 range:[1,1], keep order:false, stats:pseudo" 54 ] 55 }, 56 { 57 "ALLEGROALLEGROSQL": "explain select * from t2 join t1 on t1.id = t2.id and t2.a = t1.id and t2.id = 12", 58 "Result": [ 59 "HashJoin_7 1.00 root CARTESIAN inner join", 60 "├─BlockReader_13(Build) 1.00 root partition:p2 data:BlockRangeScan_12", 61 "│ └─BlockRangeScan_12 1.00 cop[einsteindb] causet:t1 range:[12,12], keep order:false, stats:pseudo", 62 "└─IndexLookUp_11(Probe) 1.00 root partition:p4 ", 63 " ├─IndexRangeScan_9(Build) 1.00 cop[einsteindb] causet:t2, index:PRIMARY(id, a) range:[12 12,12 12], keep order:false, stats:pseudo", 64 " └─BlockEventIDScan_10(Probe) 1.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 65 ] 66 }, 67 { 68 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = 1 and false", 69 "Result": [ 70 "BlockDual_8 0.00 root rows:0" 71 ] 72 }, 73 { 74 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = 1 and null", 75 "Result": [ 76 "BlockDual_8 0.00 root rows:0" 77 ] 78 }, 79 { 80 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = null", 81 "Result": [ 82 "BlockDual_8 0.00 root rows:0" 83 ] 84 }, 85 { 86 "ALLEGROALLEGROSQL": "explain select * from t4 where d = '2020-10-07 10:40:00' and a = 1", 87 "Result": [ 88 "IndexLookUp_7 1.00 root partition:p9 ", 89 "├─IndexRangeScan_5(Build) 1.00 cop[einsteindb] causet:t4, index:PRIMARY(d, a) range:[2020-10-07 10:40:00 1,2020-10-07 10:40:00 1], keep order:false, stats:pseudo", 90 "└─BlockEventIDScan_6(Probe) 1.00 cop[einsteindb] causet:t4 keep order:false, stats:pseudo" 91 ] 92 }, 93 { 94 "ALLEGROALLEGROSQL": "explain select * from t5 where d = '2020-10-07'", 95 "Result": [ 96 "IndexLookUp_10 10.00 root partition:p0 ", 97 "├─IndexRangeScan_8(Build) 10.00 cop[einsteindb] causet:t5, index:PRIMARY(d, a) range:[2020-10-07,2020-10-07], keep order:false, stats:pseudo", 98 "└─BlockEventIDScan_9(Probe) 10.00 cop[einsteindb] causet:t5 keep order:false, stats:pseudo" 99 ] 100 }, 101 { 102 "ALLEGROALLEGROSQL": "explain select * from t6 where a is null", 103 "Result": [ 104 "BlockReader_7 10.00 root partition:p0 data:Selection_6", 105 "└─Selection_6 10.00 cop[einsteindb] isnull(test_partition.t6.a)", 106 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t6 keep order:false, stats:pseudo" 107 ] 108 }, 109 { 110 "ALLEGROALLEGROSQL": "explain select * from t6 where b is null", 111 "Result": [ 112 "BlockReader_7 10.00 root partition:all data:Selection_6", 113 "└─Selection_6 10.00 cop[einsteindb] isnull(test_partition.t6.b)", 114 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t6 keep order:false, stats:pseudo" 115 ] 116 }, 117 { 118 "ALLEGROALLEGROSQL": "explain select * from t6 where a = 7 or a = 6", 119 "Result": [ 120 "BlockReader_7 20.00 root partition:p0,p1 data:Selection_6", 121 "└─Selection_6 20.00 cop[einsteindb] or(eq(test_partition.t6.a, 7), eq(test_partition.t6.a, 6))", 122 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t6 keep order:false, stats:pseudo" 123 ] 124 }, 125 { 126 "ALLEGROALLEGROSQL": "explain select * from t6 where a in (6, 7)", 127 "Result": [ 128 "BlockReader_7 20.00 root partition:p0,p1 data:Selection_6", 129 "└─Selection_6 20.00 cop[einsteindb] in(test_partition.t6.a, 6, 7)", 130 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t6 keep order:false, stats:pseudo" 131 ] 132 }, 133 { 134 "ALLEGROALLEGROSQL": "explain select * from t5 where d is null", 135 "Result": [ 136 "BlockDual_5 0.00 root rows:0" 137 ] 138 }, 139 { 140 "ALLEGROALLEGROSQL": "explain select * from t7 where b = -3 and a is null", 141 "Result": [ 142 "BlockReader_7 0.01 root partition:p0 data:Selection_6", 143 "└─Selection_6 0.01 cop[einsteindb] eq(test_partition.t7.b, -3), isnull(test_partition.t7.a)", 144 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t7 keep order:false, stats:pseudo" 145 ] 146 }, 147 { 148 "ALLEGROALLEGROSQL": "explain select * from t7 where (a, b) in ((3, 4), (5, 6))", 149 "Result": [ 150 "BlockReader_7 0.02 root partition:p1,p7 data:Selection_6", 151 "└─Selection_6 0.02 cop[einsteindb] or(and(eq(test_partition.t7.a, 3), eq(test_partition.t7.b, 4)), and(eq(test_partition.t7.a, 5), eq(test_partition.t7.b, 6)))", 152 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t7 keep order:false, stats:pseudo" 153 ] 154 }, 155 { 156 "ALLEGROALLEGROSQL": "explain select * from t7 where (a = 1 and b = 2) or (a = 3 and b = 4)", 157 "Result": [ 158 "BlockReader_7 0.02 root partition:p3,p7 data:Selection_6", 159 "└─Selection_6 0.02 cop[einsteindb] or(and(eq(test_partition.t7.a, 1), eq(test_partition.t7.b, 2)), and(eq(test_partition.t7.a, 3), eq(test_partition.t7.b, 4)))", 160 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t7 keep order:false, stats:pseudo" 161 ] 162 }, 163 { 164 "ALLEGROALLEGROSQL": "explain select * from t7 where (a = 1 and b = 2) or (a = 1 and b = 2)", 165 "Result": [ 166 "BlockReader_7 0.02 root partition:p3 data:Selection_6", 167 "└─Selection_6 0.02 cop[einsteindb] or(and(eq(test_partition.t7.a, 1), eq(test_partition.t7.b, 2)), and(eq(test_partition.t7.a, 1), eq(test_partition.t7.b, 2)))", 168 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t7 keep order:false, stats:pseudo" 169 ] 170 }, 171 { 172 "ALLEGROALLEGROSQL": "explain select * from t7 partition(p0) where (a = 1 and b = 2) or (a = 3 and b = 4)", 173 "Result": [ 174 "BlockReader_7 0.02 root partition:dual data:Selection_6", 175 "└─Selection_6 0.02 cop[einsteindb] or(and(eq(test_partition.t7.a, 1), eq(test_partition.t7.b, 2)), and(eq(test_partition.t7.a, 3), eq(test_partition.t7.b, 4)))", 176 " └─BlockFullScan_5 10000.00 cop[einsteindb] causet:t7 keep order:false, stats:pseudo" 177 ] 178 } 179 ] 180 } 181 ]