615 lines
27 KiB
JSON
615 lines
27 KiB
JSON
[
|
|
{
|
|
"Name": "TestUniqCompEqualEst",
|
|
"Cases": [
|
|
[
|
|
"Point_Get_5 1.00 root table:t, clustered index:PRIMARY(a, b) "
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestStatsVer2",
|
|
"Cases": [
|
|
[
|
|
"test tint a 0 1 1",
|
|
"test tint a 0 2 1",
|
|
"test tint b 0 1 1",
|
|
"test tint b 0 2 1",
|
|
"test tint c 0 1 1",
|
|
"test tint c 0 2 1",
|
|
"test tint singular 1 1 1",
|
|
"test tint singular 1 2 1",
|
|
"test tint multi 1 (1, 1) 1",
|
|
"test tint multi 1 (2, 2) 1",
|
|
"test tdouble a 0 1 1",
|
|
"test tdouble a 0 2 1",
|
|
"test tdouble b 0 1 1",
|
|
"test tdouble b 0 2 1",
|
|
"test tdouble c 0 1 1",
|
|
"test tdouble c 0 2 1",
|
|
"test tdouble singular 1 1 1",
|
|
"test tdouble singular 1 2 1",
|
|
"test tdouble multi 1 (1, 1) 1",
|
|
"test tdouble multi 1 (2, 2) 1",
|
|
"test tdecimal a 0 1.00000000000000000000 1",
|
|
"test tdecimal a 0 2.00000000000000000000 1",
|
|
"test tdecimal b 0 1.00000000000000000000 1",
|
|
"test tdecimal b 0 2.00000000000000000000 1",
|
|
"test tdecimal c 0 1.00000000000000000000 1",
|
|
"test tdecimal c 0 2.00000000000000000000 1",
|
|
"test tdecimal singular 1 1.00000000000000000000 1",
|
|
"test tdecimal singular 1 2.00000000000000000000 1",
|
|
"test tdecimal multi 1 (1.00000000000000000000, 1.00000000000000000000) 1",
|
|
"test tdecimal multi 1 (2.00000000000000000000, 2.00000000000000000000) 1",
|
|
"test tstring a 0 1 1",
|
|
"test tstring a 0 2 1",
|
|
"test tstring b 0 1 1",
|
|
"test tstring b 0 2 1",
|
|
"test tstring c 0 1 1",
|
|
"test tstring c 0 2 1",
|
|
"test tstring singular 1 1 1",
|
|
"test tstring singular 1 2 1",
|
|
"test tstring multi 1 (1, 1) 1",
|
|
"test tstring multi 1 (2, 2) 1",
|
|
"test tdatetime a 0 2001-01-01 00:00:00 1",
|
|
"test tdatetime a 0 2001-01-02 00:00:00 1",
|
|
"test tdatetime b 0 2001-01-01 00:00:00 1",
|
|
"test tdatetime b 0 2001-01-02 00:00:00 1",
|
|
"test tdatetime c 0 2001-01-01 00:00:00 1",
|
|
"test tdatetime c 0 2001-01-02 00:00:00 1",
|
|
"test tdatetime singular 1 2001-01-01 00:00:00 1",
|
|
"test tdatetime singular 1 2001-01-02 00:00:00 1",
|
|
"test tdatetime multi 1 (2001-01-01 00:00:00, 2001-01-01 00:00:00) 1",
|
|
"test tdatetime multi 1 (2001-01-02 00:00:00, 2001-01-02 00:00:00) 1",
|
|
"test tprefix a 0 111 1",
|
|
"test tprefix a 0 222 1",
|
|
"test tprefix b 0 111 1",
|
|
"test tprefix b 0 222 1",
|
|
"test tprefix prefixa 1 11 1",
|
|
"test tprefix prefixa 1 22 1",
|
|
"test ct1 a 0 1 1",
|
|
"test ct1 a 0 2 1",
|
|
"test ct1 pk 0 1 1",
|
|
"test ct1 pk 0 2 1",
|
|
"test ct1 PRIMARY 1 1 1",
|
|
"test ct1 PRIMARY 1 2 1",
|
|
"test ct2 a 0 1 1",
|
|
"test ct2 a 0 2 1",
|
|
"test ct2 b 0 1 1",
|
|
"test ct2 b 0 2 1",
|
|
"test ct2 c 0 1 1",
|
|
"test ct2 c 0 2 1",
|
|
"test ct2 PRIMARY 1 (1, 1) 1",
|
|
"test ct2 PRIMARY 1 (2, 2) 1"
|
|
],
|
|
[
|
|
"test tint a 0 0 3 1 3 5 0",
|
|
"test tint a 0 1 6 1 6 8 0",
|
|
"test tint b 0 0 3 1 3 5 0",
|
|
"test tint b 0 1 6 1 6 8 0",
|
|
"test tint c 0 0 3 1 3 5 0",
|
|
"test tint c 0 1 6 1 6 8 0",
|
|
"test tint singular 1 0 3 1 3 5 0",
|
|
"test tint singular 1 1 6 1 6 8 0",
|
|
"test tint multi 1 0 3 1 (3, 3) (5, 5) 0",
|
|
"test tint multi 1 1 6 1 (6, 6) (8, 8) 0",
|
|
"test tdouble a 0 0 3 1 3 5 0",
|
|
"test tdouble a 0 1 6 1 6 8 0",
|
|
"test tdouble b 0 0 3 1 3 5 0",
|
|
"test tdouble b 0 1 6 1 6 8 0",
|
|
"test tdouble c 0 0 3 1 3 5 0",
|
|
"test tdouble c 0 1 6 1 6 8 0",
|
|
"test tdouble singular 1 0 3 1 3 5 0",
|
|
"test tdouble singular 1 1 6 1 6 8 0",
|
|
"test tdouble multi 1 0 3 1 (3, 3) (5, 5) 0",
|
|
"test tdouble multi 1 1 6 1 (6, 6) (8, 8) 0",
|
|
"test tdecimal a 0 0 3 1 3.00000000000000000000 5.00000000000000000000 0",
|
|
"test tdecimal a 0 1 6 1 6.00000000000000000000 8.00000000000000000000 0",
|
|
"test tdecimal b 0 0 3 1 3.00000000000000000000 5.00000000000000000000 0",
|
|
"test tdecimal b 0 1 6 1 6.00000000000000000000 8.00000000000000000000 0",
|
|
"test tdecimal c 0 0 3 1 3.00000000000000000000 5.00000000000000000000 0",
|
|
"test tdecimal c 0 1 6 1 6.00000000000000000000 8.00000000000000000000 0",
|
|
"test tdecimal singular 1 0 3 1 3.00000000000000000000 5.00000000000000000000 0",
|
|
"test tdecimal singular 1 1 6 1 6.00000000000000000000 8.00000000000000000000 0",
|
|
"test tdecimal multi 1 0 3 1 (3.00000000000000000000, 3.00000000000000000000) (5.00000000000000000000, 5.00000000000000000000) 0",
|
|
"test tdecimal multi 1 1 6 1 (6.00000000000000000000, 6.00000000000000000000) (8.00000000000000000000, 8.00000000000000000000) 0",
|
|
"test tstring a 0 0 3 1 3 5 0",
|
|
"test tstring a 0 1 6 1 6 8 0",
|
|
"test tstring b 0 0 3 1 3 5 0",
|
|
"test tstring b 0 1 6 1 6 8 0",
|
|
"test tstring c 0 0 3 1 3 5 0",
|
|
"test tstring c 0 1 6 1 6 8 0",
|
|
"test tstring singular 1 0 3 1 3 5 0",
|
|
"test tstring singular 1 1 6 1 6 8 0",
|
|
"test tstring multi 1 0 3 1 (3, 3) (5, 5) 0",
|
|
"test tstring multi 1 1 6 1 (6, 6) (8, 8) 0",
|
|
"test tdatetime a 0 0 1 1 2001-01-03 00:00:00 2001-01-03 00:00:00 0",
|
|
"test tdatetime a 0 1 2 1 2001-01-04 00:00:00 2001-01-04 00:00:00 0",
|
|
"test tdatetime b 0 0 1 1 2001-01-03 00:00:00 2001-01-03 00:00:00 0",
|
|
"test tdatetime b 0 1 2 1 2001-01-04 00:00:00 2001-01-04 00:00:00 0",
|
|
"test tdatetime c 0 0 1 1 2001-01-03 00:00:00 2001-01-03 00:00:00 0",
|
|
"test tdatetime c 0 1 2 1 2001-01-04 00:00:00 2001-01-04 00:00:00 0",
|
|
"test tdatetime singular 1 0 1 1 2001-01-03 00:00:00 2001-01-03 00:00:00 0",
|
|
"test tdatetime singular 1 1 2 1 2001-01-04 00:00:00 2001-01-04 00:00:00 0",
|
|
"test tdatetime multi 1 0 1 1 (2001-01-03 00:00:00, 2001-01-03 00:00:00) (2001-01-03 00:00:00, 2001-01-03 00:00:00) 0",
|
|
"test tdatetime multi 1 1 2 1 (2001-01-04 00:00:00, 2001-01-04 00:00:00) (2001-01-04 00:00:00, 2001-01-04 00:00:00) 0",
|
|
"test tprefix a 0 0 2 1 333 444 0",
|
|
"test tprefix a 0 1 4 1 555 666 0",
|
|
"test tprefix b 0 0 2 1 333 444 0",
|
|
"test tprefix b 0 1 4 1 555 666 0",
|
|
"test tprefix prefixa 1 0 2 1 33 44 0",
|
|
"test tprefix prefixa 1 1 4 1 55 66 0",
|
|
"test ct1 a 0 0 3 1 3 5 0",
|
|
"test ct1 a 0 1 6 1 6 8 0",
|
|
"test ct1 pk 0 0 3 1 3 5 0",
|
|
"test ct1 pk 0 1 6 1 6 8 0",
|
|
"test ct1 PRIMARY 1 0 3 1 3 5 0",
|
|
"test ct1 PRIMARY 1 1 6 1 6 8 0",
|
|
"test ct2 a 0 0 3 1 3 5 0",
|
|
"test ct2 a 0 1 6 1 6 8 0",
|
|
"test ct2 b 0 0 3 1 3 5 0",
|
|
"test ct2 b 0 1 6 1 6 8 0",
|
|
"test ct2 c 0 0 3 1 3 5 0",
|
|
"test ct2 c 0 1 6 1 6 8 0",
|
|
"test ct2 PRIMARY 1 0 3 1 (3, 3) (5, 5) 0",
|
|
"test ct2 PRIMARY 1 1 6 1 (6, 6) (8, 8) 0"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tint.a, 1)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 0.75 root data:Selection_6",
|
|
"└─Selection_6 0.75 cop[tikv] eq(test.tint.a, 4)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tint.a, 8)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdouble, index:singular(a) range:[1,1], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 0.75 root ",
|
|
"├─IndexRangeScan_8(Build) 0.75 cop[tikv] table:tdouble, index:singular(a) range:[4,4], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 0.75 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdouble, index:singular(a) range:[8,8], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdecimal, index:singular(a) range:[1.00000000000000000000,1.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 0.75 root ",
|
|
"├─IndexRangeScan_8(Build) 0.75 cop[tikv] table:tdecimal, index:singular(a) range:[4.00000000000000000000,4.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 0.75 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdecimal, index:singular(a) range:[8.00000000000000000000,8.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tstring.a, \"1\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 0.75 root data:Selection_6",
|
|
"└─Selection_6 0.75 cop[tikv] eq(test.tstring.a, \"4\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tstring.a, \"8\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.a, 2001-01-01 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.a, 2001-01-02 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.a, 2001-01-04 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tprefix.a, \"111\")",
|
|
" └─TableFullScan_5 6.00 cop[tikv] table:tprefix keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tprefix.a, \"444\")",
|
|
" └─TableFullScan_5 6.00 cop[tikv] table:tprefix keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_11 0.00 root ",
|
|
"├─IndexRangeScan_8(Build) 0.00 cop[tikv] table:tprefix, index:prefixa(a) range:[\"88\",\"88\"], keep order:false",
|
|
"└─Selection_10(Probe) 0.00 cop[tikv] eq(test.tprefix.a, \"888\")",
|
|
" └─TableRowIDScan_9 0.00 cop[tikv] table:tprefix keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tint.b, 1), eq(test.tint.c, 1)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 0.75 root data:Selection_6",
|
|
"└─Selection_6 0.75 cop[tikv] eq(test.tint.b, 4), eq(test.tint.c, 4)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tint.b, 8), eq(test.tint.c, 8)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdouble, index:multi(b, c) range:[1 1,1 1], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 0.75 root ",
|
|
"├─IndexRangeScan_8(Build) 0.75 cop[tikv] table:tdouble, index:multi(b, c) range:[4 4,4 4], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 0.75 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdouble, index:multi(b, c) range:[8 8,8 8], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdecimal, index:multi(b, c) range:[1.00000000000000000000 1.00000000000000000000,1.00000000000000000000 1.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 0.75 root ",
|
|
"├─IndexRangeScan_8(Build) 0.75 cop[tikv] table:tdecimal, index:multi(b, c) range:[4.00000000000000000000 4.00000000000000000000,4.00000000000000000000 4.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 0.75 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdecimal, index:multi(b, c) range:[8.00000000000000000000 8.00000000000000000000,8.00000000000000000000 8.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tstring.b, \"1\"), eq(test.tstring.c, \"1\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 0.75 root data:Selection_6",
|
|
"└─Selection_6 0.75 cop[tikv] eq(test.tstring.b, \"4\"), eq(test.tstring.c, \"4\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tstring.b, \"8\"), eq(test.tstring.c, \"8\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.b, 2001-01-01 00:00:00.000000), eq(test.tdatetime.c, 2001-01-01 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.b, 2001-01-02 00:00:00.000000), eq(test.tdatetime.c, 2001-01-02 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.b, 2001-01-04 00:00:00.000000), eq(test.tdatetime.c, 2001-01-04 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tint.b, 1)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tint.b, 4)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tint.b, 8)",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tint keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdouble, index:multi(b, c) range:[1,1], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdouble, index:multi(b, c) range:[4,4], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdouble, index:multi(b, c) range:[8,8], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdouble keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdecimal, index:multi(b, c) range:[1.00000000000000000000,1.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdecimal, index:multi(b, c) range:[4.00000000000000000000,4.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"IndexLookUp_10 1.00 root ",
|
|
"├─IndexRangeScan_8(Build) 1.00 cop[tikv] table:tdecimal, index:multi(b, c) range:[8.00000000000000000000,8.00000000000000000000], keep order:false",
|
|
"└─TableRowIDScan_9(Probe) 1.00 cop[tikv] table:tdecimal keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tstring.b, \"1\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tstring.b, \"4\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tstring.b, \"8\")",
|
|
" └─TableFullScan_5 8.00 cop[tikv] table:tstring keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.b, 2001-01-01 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.b, 2001-01-02 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.tdatetime.b, 2001-01-04 00:00:00.000000)",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:tdatetime keep order:false"
|
|
],
|
|
[
|
|
"TableReader_6 5.00 root data:TableRangeScan_5",
|
|
"└─TableRangeScan_5 5.00 cop[tikv] table:ct1 range:[\"1\",\"4\"], keep order:false"
|
|
],
|
|
[
|
|
"TableReader_6 3.75 root data:TableRangeScan_5",
|
|
"└─TableRangeScan_5 3.75 cop[tikv] table:ct1 range:[\"4\",\"6\"], keep order:false"
|
|
],
|
|
[
|
|
"TableReader_6 3.00 root data:TableRangeScan_5",
|
|
"└─TableRangeScan_5 3.00 cop[tikv] table:ct1 range:[\"6\",\"8\"], keep order:false"
|
|
],
|
|
[
|
|
"TableReader_6 1.00 root data:TableRangeScan_5",
|
|
"└─TableRangeScan_5 1.00 cop[tikv] table:ct2 range:[1 1,1 8], keep order:false"
|
|
],
|
|
[
|
|
"TableReader_6 1.00 root data:TableRangeScan_5",
|
|
"└─TableRangeScan_5 1.00 cop[tikv] table:ct2 range:[4 1,4 8], keep order:false"
|
|
],
|
|
[
|
|
"TableReader_6 1.00 root data:TableRangeScan_5",
|
|
"└─TableRangeScan_5 1.00 cop[tikv] table:ct2 range:[8 1,8 8], keep order:false"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestTopNOutOfHist",
|
|
"Cases": [
|
|
[
|
|
"test topn_before_hist a 0 1 4",
|
|
"test topn_before_hist a 0 3 2",
|
|
"test topn_before_hist idx 1 1 4",
|
|
"test topn_before_hist idx 1 3 2",
|
|
"test topn_after_hist a 0 2 2",
|
|
"test topn_after_hist a 0 7 4",
|
|
"test topn_after_hist idx 1 2 2",
|
|
"test topn_after_hist idx 1 7 4",
|
|
"test topn_before_hist_no_index a 0 1 4",
|
|
"test topn_before_hist_no_index a 0 3 2",
|
|
"test topn_after_hist_no_index a 0 2 2",
|
|
"test topn_after_hist_no_index a 0 7 4"
|
|
],
|
|
[
|
|
"test topn_before_hist a 0 0 2 1 4 5 0",
|
|
"test topn_before_hist a 0 1 3 1 6 6 0",
|
|
"test topn_before_hist idx 1 0 2 1 4 5 0",
|
|
"test topn_before_hist idx 1 1 3 1 6 6 0",
|
|
"test topn_after_hist a 0 0 2 1 3 4 0",
|
|
"test topn_after_hist a 0 1 3 1 5 5 0",
|
|
"test topn_after_hist idx 1 0 2 1 3 4 0",
|
|
"test topn_after_hist idx 1 1 3 1 5 5 0",
|
|
"test topn_before_hist_no_index a 0 0 2 1 4 5 0",
|
|
"test topn_before_hist_no_index a 0 1 3 1 6 6 0",
|
|
"test topn_after_hist_no_index a 0 0 2 1 3 4 0",
|
|
"test topn_after_hist_no_index a 0 1 3 1 5 5 0"
|
|
],
|
|
[
|
|
"IndexReader_6 4.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 4.00 cop[tikv] table:topn_before_hist, index:idx(a) range:[1,1], keep order:false"
|
|
],
|
|
[
|
|
"IndexReader_6 0.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 0.00 cop[tikv] table:topn_before_hist, index:idx(a) range:[2,2], keep order:false"
|
|
],
|
|
[
|
|
"IndexReader_6 4.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 4.00 cop[tikv] table:topn_after_hist, index:idx(a) range:[7,7], keep order:false"
|
|
],
|
|
[
|
|
"IndexReader_6 0.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 0.00 cop[tikv] table:topn_after_hist, index:idx(a) range:[6,6], keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 4.00 root data:Selection_6",
|
|
"└─Selection_6 4.00 cop[tikv] eq(test.topn_after_hist_no_index.a, 7)",
|
|
" └─TableFullScan_5 9.00 cop[tikv] table:topn_after_hist_no_index keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.topn_after_hist_no_index.a, 6)",
|
|
" └─TableFullScan_5 9.00 cop[tikv] table:topn_after_hist_no_index keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 4.00 root data:Selection_6",
|
|
"└─Selection_6 4.00 cop[tikv] eq(test.topn_before_hist_no_index.a, 1)",
|
|
" └─TableFullScan_5 9.00 cop[tikv] table:topn_before_hist_no_index keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] eq(test.topn_before_hist_no_index.a, 2)",
|
|
" └─TableFullScan_5 9.00 cop[tikv] table:topn_before_hist_no_index keep order:false"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestColumnIndexNullEstimation",
|
|
"Cases": [
|
|
[
|
|
"IndexReader_6 4.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 4.00 cop[tikv] table:t, index:idx_b(b) range:[NULL,NULL], keep order:false"
|
|
],
|
|
[
|
|
"IndexReader_6 1.00 root index:IndexFullScan_5",
|
|
"└─IndexFullScan_5 1.00 cop[tikv] table:t, index:idx_b(b) keep order:false"
|
|
],
|
|
[
|
|
"IndexReader_6 4.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 4.00 cop[tikv] table:t, index:idx_b(b) range:[NULL,NULL], (3,+inf], keep order:false"
|
|
],
|
|
[
|
|
"IndexReader_5 5.00 root index:IndexFullScan_4",
|
|
"└─IndexFullScan_4 5.00 cop[tikv] table:t, index:idx_b(b) keep order:false"
|
|
],
|
|
[
|
|
"IndexReader_6 1.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 1.00 cop[tikv] table:t, index:idx_b(b) range:[-inf,4), keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 1.00 root data:Selection_6",
|
|
"└─Selection_6 1.00 cop[tikv] isnull(test.t.a)",
|
|
" └─TableFullScan_5 5.00 cop[tikv] table:t keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 4.00 root data:Selection_6",
|
|
"└─Selection_6 4.00 cop[tikv] not(isnull(test.t.a))",
|
|
" └─TableFullScan_5 5.00 cop[tikv] table:t keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 2.00 root data:Selection_6",
|
|
"└─Selection_6 2.00 cop[tikv] or(isnull(test.t.a), gt(test.t.a, 3))",
|
|
" └─TableFullScan_5 5.00 cop[tikv] table:t keep order:false"
|
|
],
|
|
[
|
|
"TableReader_5 5.00 root data:TableFullScan_4",
|
|
"└─TableFullScan_4 5.00 cop[tikv] table:t keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 3.00 root data:Selection_6",
|
|
"└─Selection_6 3.00 cop[tikv] lt(test.t.a, 4)",
|
|
" └─TableFullScan_5 5.00 cop[tikv] table:t keep order:false"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestDiscreteDistribution",
|
|
"Cases": [
|
|
[
|
|
"IndexReader_6 0.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 0.00 cop[tikv] table:t, index:idx(a, b) range:[\"tw\" -inf,\"tw\" 0), keep order:false"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestPrimaryKeySelectivity",
|
|
"Cases": [
|
|
[
|
|
"TableReader_7 3333.33 root data:Selection_6",
|
|
"└─Selection_6 3333.33 cop[tikv] gt(test.t.a, \"t\")",
|
|
" └─TableFullScan_5 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
|
|
],
|
|
[
|
|
"TableReader_6 3333.33 root data:TableRangeScan_5",
|
|
"└─TableRangeScan_5 3333.33 cop[tikv] table:t range:(1,+inf], keep order:false, stats:pseudo"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestSelectCombinedLowBound",
|
|
"Cases": [
|
|
[
|
|
"IndexReader_6 7.00 root index:IndexRangeScan_5",
|
|
"└─IndexRangeScan_5 7.00 cop[tikv] table:t, index:kid(kid, pid) range:[1,1], keep order:false"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestCollationColumnEstimate",
|
|
"Cases": [
|
|
[
|
|
"test t a 0 \u0000A\u0000A\u0000A 2",
|
|
"test t a 0 \u0000B\u0000B\u0000B 2"
|
|
],
|
|
[
|
|
"TableReader_7 2.00 root data:Selection_6",
|
|
"└─Selection_6 2.00 cop[tikv] eq(test.t.a, \"aÄa\")",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:t keep order:false"
|
|
],
|
|
[
|
|
"TableReader_7 2.00 root data:Selection_6",
|
|
"└─Selection_6 2.00 cop[tikv] gt(test.t.a, \"aÄa\")",
|
|
" └─TableFullScan_5 4.00 cop[tikv] table:t keep order:false"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"Name": "TestDNFCondSelectivity",
|
|
"Cases": [
|
|
{
|
|
"SQL": "select * from t where b > 7 or c < 4",
|
|
"Selectivity": 0.34375
|
|
},
|
|
{
|
|
"SQL": "select * from t where d < 5 or b > 6",
|
|
"Selectivity": 0.625
|
|
},
|
|
{
|
|
"SQL": "select * from t where a > 8 or d < 4 or c > 7 or b < 5",
|
|
"Selectivity": 0.82421875
|
|
},
|
|
{
|
|
"SQL": "select * from t where a < 8 and (b > 10 or c < 3 or b > 4) and a > 2",
|
|
"Selectivity": 0
|
|
}
|
|
]
|
|
}
|
|
]
|