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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c9d472d5
Commit
c9d472d5
authored
Nov 26, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:wl2126
into mysql.com:/home/jonas/src/wl2126
parents
a90335e9
af224c15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
63 deletions
+60
-63
ndb/docs/wl2077.txt
ndb/docs/wl2077.txt
+13
-5
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+4
-1
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+2
-2
ndb/test/ndbapi/testScanPerf.cpp
ndb/test/ndbapi/testScanPerf.cpp
+41
-55
No files found.
ndb/docs/wl2077.txt
View file @
c9d472d5
...
@@ -3,12 +3,16 @@
...
@@ -3,12 +3,16 @@
1 host, 1 ndbd, api co-hosted
1 host, 1 ndbd, api co-hosted
results in 1000 rows / sec
results in 1000 rows / sec
wo/reset bounds w/ rb
wo/reset bounds w/ rb
4.1-read committed a) 4.9 b) 7.4
4.1-read committed a) 4.9 b) 7.4
4.1-read hold lock c) 4.7 d) 6.7
4.1-read hold lock c) 4.7 d) 6.7
wl2077-read committed 6.4 (+30%) 10.8 (+45%)
wl2077-read hold lock 4.6 (-1%) 6.7 (+ 0%)
5.0-ndb batch read committed f) 50' (+680%) g) 50' (+360%)
5.0-ndb batch read hold lock h) 12' (+160%) i) 13' (+79%)
wl2077-read committed 6.4 (+30%) 10.8 (+45%)
wl2077-read hold lock 4.6 (-1%) 6.7 (+ 0%)
-- Comparision e)
-- Comparision e)
serial pk: 10.9'
serial pk: 10.9'
...
@@ -25,6 +29,8 @@ b) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 0 -r 2 -q 1 T1
...
@@ -25,6 +29,8 @@ b) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 0 -r 2 -q 1 T1
c) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 1 -r 2 -q 0 T1
c) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 1 -r 2 -q 0 T1
d) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 1 -r 2 -q 1 T1
d) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 1 -r 2 -q 1 T1
e) testReadPerf -i 25 -c 0 -d 0 T1
e) testReadPerf -i 25 -c 0 -d 0 T1
f) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 0 -r 3 -q 0 -m 1000 -i 10 T1
g) testScanPerf -s 100000 -c 0 -d 0 -a 1 -l 0 -r 3 -q 1 -m 1000 -i 10 T1
--- music join 1db-co 2db-co
--- music join 1db-co 2db-co
...
@@ -33,3 +39,5 @@ e) testReadPerf -i 25 -c 0 -d 0 T1
...
@@ -33,3 +39,5 @@ e) testReadPerf -i 25 -c 0 -d 0 T1
wl2077 12s 14s
wl2077 12s 14s
wl2077 wo/ blobs 1.2s (-30%) 2.5s (-22%)
wl2077 wo/ blobs 1.2s (-30%) 2.5s (-22%)
pekka-blob-fix 1.3s
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
c9d472d5
...
@@ -8110,7 +8110,10 @@ void Dblqh::nextScanConfScanLab(Signal* signal)
...
@@ -8110,7 +8110,10 @@ void Dblqh::nextScanConfScanLab(Signal* signal)
if
(
scanptr
.
p
->
m_curr_batch_size_rows
>
0
)
{
if
(
scanptr
.
p
->
m_curr_batch_size_rows
>
0
)
{
jam
();
jam
();
scanptr
.
p
->
scanCompletedStatus
=
ZTRUE
;
if
((
tcConnectptr
.
p
->
primKeyLen
-
4
)
==
0
)
scanptr
.
p
->
scanCompletedStatus
=
ZTRUE
;
scanptr
.
p
->
scanState
=
ScanRecord
::
WAIT_SCAN_NEXTREQ
;
scanptr
.
p
->
scanState
=
ScanRecord
::
WAIT_SCAN_NEXTREQ
;
sendScanFragConf
(
signal
,
ZFALSE
);
sendScanFragConf
(
signal
,
ZFALSE
);
return
;
return
;
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
c9d472d5
...
@@ -1630,7 +1630,7 @@ NdbIndexScanOperation::set_new_bound()
...
@@ -1630,7 +1630,7 @@ NdbIndexScanOperation::set_new_bound()
Uint32
bound_head
=
*
m_first_bound_word
;
Uint32
bound_head
=
*
m_first_bound_word
;
bound_head
|=
(
theTupKeyLen
-
m_this_bound_start
)
<<
16
;
bound_head
|=
(
theTupKeyLen
-
m_this_bound_start
)
<<
16
;
*
m_first_bound_word
=
bound_head
;
*
m_first_bound_word
=
bound_head
;
m_first_bound_word
=
theKEYINFOptr
;
m_first_bound_word
=
theKEYINFOptr
+
theTotalNrOfKeyWordInSignal
;
;
m_this_bound_start
=
theTupKeyLen
;
m_this_bound_start
=
theTupKeyLen
;
}
}
ndb/test/ndbapi/testScanPerf.cpp
View file @
c9d472d5
...
@@ -38,10 +38,10 @@ struct Parameter {
...
@@ -38,10 +38,10 @@ struct Parameter {
#define P_ROWS 7
#define P_ROWS 7
#define P_LOOPS 8
#define P_LOOPS 8
#define P_CREATE 9
#define P_CREATE 9
#define P_LOAD 10
#define P_RESET 11
#define P_RESET 11
#define P_MULTI 12
#define P_MAX 1
2
#define P_MAX 1
3
static
static
Parameter
Parameter
...
@@ -57,7 +57,8 @@ g_paramters[] = {
...
@@ -57,7 +57,8 @@ g_paramters[] = {
{
"iterations"
,
3
,
1
,
~
0
},
{
"iterations"
,
3
,
1
,
~
0
},
{
"create_drop"
,
1
,
0
,
1
},
{
"create_drop"
,
1
,
0
,
1
},
{
"data"
,
1
,
0
,
1
},
{
"data"
,
1
,
0
,
1
},
{
"q-reset bounds"
,
0
,
1
,
0
}
{
"q-reset bounds"
,
0
,
1
,
0
},
{
"multi read range"
,
1000
,
1
,
~
0
}
};
};
static
Ndb
*
g_ndb
=
0
;
static
Ndb
*
g_ndb
=
0
;
...
@@ -67,10 +68,7 @@ static char g_tablename[256];
...
@@ -67,10 +68,7 @@ static char g_tablename[256];
static
char
g_indexname
[
256
];
static
char
g_indexname
[
256
];
int
create_table
();
int
create_table
();
int
load_table
();
int
run_scan
();
int
run_scan
();
int
clear_table
();
int
drop_table
();
int
int
main
(
int
argc
,
const
char
**
argv
){
main
(
int
argc
,
const
char
**
argv
){
...
@@ -117,14 +115,8 @@ main(int argc, const char** argv){
...
@@ -117,14 +115,8 @@ main(int argc, const char** argv){
BaseString
::
snprintf
(
g_indexname
,
sizeof
(
g_indexname
),
"IDX_%s"
,
T
);
BaseString
::
snprintf
(
g_indexname
,
sizeof
(
g_indexname
),
"IDX_%s"
,
T
);
if
(
create_table
())
if
(
create_table
())
goto
error
;
goto
error
;
if
(
load_table
())
goto
error
;
if
(
run_scan
())
if
(
run_scan
())
goto
error
;
goto
error
;
if
(
clear_table
())
goto
error
;
if
(
drop_table
())
goto
error
;
}
}
if
(
g_ndb
)
delete
g_ndb
;
if
(
g_ndb
)
delete
g_ndb
;
...
@@ -139,6 +131,7 @@ create_table(){
...
@@ -139,6 +131,7 @@ create_table(){
NdbDictionary
::
Dictionary
*
dict
=
g_ndb
->
getDictionary
();
NdbDictionary
::
Dictionary
*
dict
=
g_ndb
->
getDictionary
();
assert
(
dict
);
assert
(
dict
);
if
(
g_paramters
[
P_CREATE
].
value
){
if
(
g_paramters
[
P_CREATE
].
value
){
g_ndb
->
getDictionary
()
->
dropTable
(
g_tablename
);
const
NdbDictionary
::
Table
*
pTab
=
NDBT_Tables
::
getTable
(
g_tablename
);
const
NdbDictionary
::
Table
*
pTab
=
NDBT_Tables
::
getTable
(
g_tablename
);
assert
(
pTab
);
assert
(
pTab
);
NdbDictionary
::
Table
copy
=
*
pTab
;
NdbDictionary
::
Table
copy
=
*
pTab
;
...
@@ -167,46 +160,18 @@ create_table(){
...
@@ -167,46 +160,18 @@ create_table(){
g_index
=
dict
->
getIndex
(
g_indexname
,
g_tablename
);
g_index
=
dict
->
getIndex
(
g_indexname
,
g_tablename
);
assert
(
g_table
);
assert
(
g_table
);
assert
(
g_index
);
assert
(
g_index
);
return
0
;
}
int
if
(
g_paramters
[
P_CREATE
].
value
)
drop_table
(){
{
if
(
!
g_paramters
[
P_CREATE
].
value
)
int
rows
=
g_paramters
[
P_ROWS
].
value
;
return
0
;
HugoTransactions
hugoTrans
(
*
g_table
);
if
(
g_ndb
->
getDictionary
()
->
dropTable
(
g_table
->
getName
())
!=
0
){
if
(
hugoTrans
.
loadTable
(
g_ndb
,
rows
)){
g_err
<<
"Failed to drop table: "
<<
g_table
->
getName
()
<<
endl
;
g_err
.
println
(
"Failed to load %s with %d rows"
,
return
-
1
;
g_table
->
getName
(),
rows
);
}
return
-
1
;
g_table
=
0
;
}
return
0
;
}
int
load_table
(){
if
(
!
g_paramters
[
P_LOAD
].
value
)
return
0
;
int
rows
=
g_paramters
[
P_ROWS
].
value
;
HugoTransactions
hugoTrans
(
*
g_table
);
if
(
hugoTrans
.
loadTable
(
g_ndb
,
rows
)){
g_err
.
println
(
"Failed to load %s with %d rows"
,
g_table
->
getName
(),
rows
);
return
-
1
;
}
}
return
0
;
}
int
clear_table
(){
if
(
!
g_paramters
[
P_LOAD
].
value
)
return
0
;
int
rows
=
g_paramters
[
P_ROWS
].
value
;
UtilTransactions
utilTrans
(
*
g_table
);
if
(
utilTrans
.
clearTable
(
g_ndb
,
rows
)
!=
0
){
g_err
.
println
(
"Failed to clear table %s"
,
g_table
->
getName
());
return
-
1
;
}
return
0
;
return
0
;
}
}
...
@@ -222,11 +187,12 @@ run_scan(){
...
@@ -222,11 +187,12 @@ run_scan(){
int
sum_time
=
0
;
int
sum_time
=
0
;
int
sample_rows
=
0
;
int
sample_rows
=
0
;
int
tot_rows
=
0
;
NDB_TICKS
sample_start
=
NdbTick_CurrentMillisecond
();
NDB_TICKS
sample_start
=
NdbTick_CurrentMillisecond
();
Uint32
tot
=
g_paramters
[
P_ROWS
].
value
;
Uint32
tot
=
g_paramters
[
P_ROWS
].
value
;
if
(
g_paramters
[
P_BOUND
].
value
=
=
2
||
g_paramters
[
P_FILT
].
value
==
2
)
if
(
g_paramters
[
P_BOUND
].
value
>
=
2
||
g_paramters
[
P_FILT
].
value
==
2
)
iter
*=
g_paramters
[
P_ROWS
].
value
;
iter
*=
g_paramters
[
P_ROWS
].
value
;
NdbScanOperation
*
pOp
=
0
;
NdbScanOperation
*
pOp
=
0
;
...
@@ -293,11 +259,24 @@ run_scan(){
...
@@ -293,11 +259,24 @@ run_scan(){
#else
#else
pIOp
->
setBound
((
Uint32
)
0
,
NdbIndexScanOperation
::
BoundEQ
,
&
row
);
pIOp
->
setBound
((
Uint32
)
0
,
NdbIndexScanOperation
::
BoundEQ
,
&
row
);
#endif
#endif
if
(
g_paramters
[
P_RESET
].
value
==
2
)
goto
execute
;
break
;
}
case
3
:
{
// read multi
int
multi
=
g_paramters
[
P_MULTI
].
value
;
int
tot
=
g_paramters
[
P_ROWS
].
value
;
for
(;
multi
>
0
&&
i
<
iter
;
--
multi
,
i
++
)
{
int
row
=
rand
()
%
tot
;
pIOp
->
setBound
((
Uint32
)
0
,
NdbIndexScanOperation
::
BoundEQ
,
&
row
);
pIOp
->
set_new_bound
();
}
if
(
g_paramters
[
P_RESET
].
value
==
2
)
goto
execute
;
break
;
break
;
}
}
}
}
if
(
g_paramters
[
P_RESET
].
value
==
1
)
goto
execute
;
}
}
assert
(
pOp
);
assert
(
pOp
);
assert
(
rs
);
assert
(
rs
);
...
@@ -330,9 +309,15 @@ run_scan(){
...
@@ -330,9 +309,15 @@ run_scan(){
}
}
assert
(
check
==
0
);
assert
(
check
==
0
);
if
(
g_paramters
[
P_RESET
].
value
==
1
)
g_paramters
[
P_RESET
].
value
=
2
;
for
(
int
i
=
0
;
i
<
g_table
->
getNoOfColumns
();
i
++
){
for
(
int
i
=
0
;
i
<
g_table
->
getNoOfColumns
();
i
++
){
pOp
->
getValue
(
i
);
pOp
->
getValue
(
i
);
}
}
if
(
g_paramters
[
P_RESET
].
value
==
1
)
g_paramters
[
P_RESET
].
value
=
2
;
execute:
execute:
int
rows
=
0
;
int
rows
=
0
;
check
=
pTrans
->
execute
(
NoCommit
);
check
=
pTrans
->
execute
(
NoCommit
);
...
@@ -364,6 +349,7 @@ run_scan(){
...
@@ -364,6 +349,7 @@ run_scan(){
int
time_passed
=
(
int
)(
stop
-
start1
);
int
time_passed
=
(
int
)(
stop
-
start1
);
sample_rows
+=
rows
;
sample_rows
+=
rows
;
sum_time
+=
time_passed
;
sum_time
+=
time_passed
;
tot_rows
+=
rows
;
if
(
sample_rows
>=
tot
)
if
(
sample_rows
>=
tot
)
{
{
...
@@ -375,8 +361,8 @@ run_scan(){
...
@@ -375,8 +361,8 @@ run_scan(){
sample_start
=
stop
;
sample_start
=
stop
;
}
}
}
}
g_err
.
println
(
"Avg time: %d ms = %u rows/sec"
,
sum_time
/
iter
,
g_err
.
println
(
"Avg time: %d ms = %u rows/sec"
,
sum_time
/
tot_rows
,
(
1000
*
tot
*
iter
)
/
sum_time
);
(
1000
*
tot
_rows
)
/
sum_time
);
return
0
;
return
0
;
}
}
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