Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
56ed8eb5
Commit
56ed8eb5
authored
Aug 20, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#261 run multiple queries in part_index_scan
parent
91207143
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
216 additions
and
15 deletions
+216
-15
mysql-test/suite/tokudb.bugs/r/part_index_scan.result
mysql-test/suite/tokudb.bugs/r/part_index_scan.result
+162
-0
mysql-test/suite/tokudb.bugs/t/part_index_scan.test
mysql-test/suite/tokudb.bugs/t/part_index_scan.test
+54
-15
No files found.
mysql-test/suite/tokudb.bugs/r/part_index_scan.result
View file @
56ed8eb5
...
...
@@ -64,6 +64,60 @@ insert into t3 select * from t;
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t1;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
select count(*) from t2;
count(*)
8388608
...
...
@@ -71,10 +125,91 @@ count(*)
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
select count(*) from t3;
count(*)
8388608
1
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t1 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
select count(*) from t2 where num>7000000;
count(*)
1847274
...
...
@@ -82,5 +217,32 @@ count(*)
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
select count(*) from t3 where num>7000000;
count(*)
1847274
1
drop table if exists t,t1,t2,t3;
mysql-test/suite/tokudb.bugs/t/part_index_scan.test
View file @
56ed8eb5
# verify that index scans on parititions are not slow
# due totokudb bulk fetch not being used
# due to
tokudb bulk fetch not being used
source
include
/
have_tokudb
.
inc
;
source
include
/
have_partition
.
inc
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
drop
table
if
exists
t
,
t1
,
t2
,
t3
;
enable_warnings
;
let
$debug
=
0
;
let
$maxq
=
10
;
CREATE
TABLE
`t`
(
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
...
...
@@ -13,6 +16,7 @@ CREATE TABLE `t` (
);
# put 8M rows into t
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"start
$ts
"
;
}
INSERT
INTO
t
values
(
null
,
null
);
INSERT
INTO
t
SELECT
null
,
null
FROM
t
;
INSERT
INTO
t
SELECT
null
,
null
FROM
t
;
...
...
@@ -37,7 +41,9 @@ INSERT INTO t SELECT null,null FROM t;
INSERT
INTO
t
SELECT
null
,
null
FROM
t
;
INSERT
INTO
t
SELECT
null
,
null
FROM
t
;
INSERT
INTO
t
SELECT
null
,
null
FROM
t
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select
$ts
"
;
}
SELECT
count
(
*
)
FROM
t
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select done
$ts
"
;
}
CREATE
TABLE
`t1`
(
`num`
int
(
10
)
unsigned
NOT
NULL
,
...
...
@@ -68,48 +74,81 @@ PARTITION BY RANGE (num)
PARTITION
p7
VALUES
LESS
THAN
(
8000000
),
PARTITION
px
VALUES
LESS
THAN
MAXVALUE
);
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"insert t1
$ts
"
;
}
insert
into
t1
select
*
from
t
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"insert t2
$ts
"
;
}
insert
into
t2
select
*
from
t
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"insert t3
$ts
"
;
}
insert
into
t3
select
*
from
t
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select t1
$ts
"
;
}
# verify that full index scans on partitioned tables t2 and t3 are comparable to a non-partitioned table t1
let
$s
=
`select to_seconds(now())`
;
select
count
(
*
)
from
t1
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
select
count
(
*
)
from
t1
;
inc
$i
;
}
let
$t1
=
`select to_seconds(now()) - $s`
;
# echo $t1;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select t2
$ts
"
;
}
let
$s
=
`select to_seconds(now())`
;
select
count
(
*
)
from
t2
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
select
count
(
*
)
from
t2
;
inc
$i
;
}
let
$t2
=
`select to_seconds(now()) - $s`
;
# echo $t2;
let
$d
=
`select abs($t2 - $t1) <= $t1`
;
echo
$d
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select t3
$ts
"
;
}
let
$s
=
`select to_seconds(now())`
;
select
count
(
*
)
from
t3
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
select
count
(
*
)
from
t3
;
inc
$i
;
}
let
$t3
=
`select to_seconds(now()) - $s`
;
# echo $t3;
let
$d
=
`select abs($t3 - $t1) <= $t1`
;
echo
$d
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select t1
$ts
"
;
}
let
$s
=
`select to_seconds(now())`
;
select
count
(
*
)
from
t1
where
num
>
7000000
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
select
count
(
*
)
from
t1
where
num
>
7000000
;
inc
$i
;
}
let
$t1
=
`select to_seconds(now()) - $s`
;
# echo $t1;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select t2
$ts
"
;
}
let
$s
=
`select to_seconds(now())`
;
select
count
(
*
)
from
t2
where
num
>
7000000
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
select
count
(
*
)
from
t2
where
num
>
7000000
;
inc
$i
;
}
let
$t2
=
`select to_seconds(now()) - $s`
;
# echo $t2;
let
$d
=
`select abs($t2 - $t1) <= $t1`
;
echo
$d
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"select t3
$ts
"
;
}
let
$s
=
`select to_seconds(now())`
;
select
count
(
*
)
from
t3
where
num
>
7000000
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
select
count
(
*
)
from
t3
where
num
>
7000000
;
inc
$i
;
}
let
$t3
=
`select to_seconds(now()) - $s`
;
# echo $t3;
let
$d
=
`select abs($t3 - $t1) <= $t1`
;
echo
$d
;
enable_warnings
;
if
(
$debug
)
{
let
$ts
=
`select now()`
;
echo
"done
$ts
"
;
}
drop
table
if
exists
t
,
t1
,
t2
,
t3
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment