-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
1,924 additions
and
1,444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
module.exports.title = 'select 1000 rows'; | ||
module.exports.displaySql = 'select * from 1000 rows (int + string(32))'; | ||
module.exports.benchFct = async function (conn, type, deferred) { | ||
const res = await conn.query("select seq, 'abcdefghijabcdefghijabcdefghijaa' from seq_1_to_1000"); | ||
const res = await conn.query('select * from 1000rows'); | ||
deferred.resolve(res); | ||
}; | ||
|
||
module.exports.initFct = function (conn) { | ||
conn.query('DROP TABLE IF EXISTS 1000rows'); | ||
conn.query('CREATE TABLE 1000rows(id INT not null primary key auto_increment, val VARCHAR(32))'); | ||
let inserts = []; | ||
for (let i = 0; i < 1000; i++) { | ||
inserts.push(conn.query('INSERT INTO 1000rows(val) VALUES (?) ', ['abcdefghijabcdefghijabcdefghijaa'])); | ||
} | ||
return Promise.all(inserts).catch((e) => { | ||
console.log(e); | ||
throw e; | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports.title = 'select 1000 rows - BINARY'; | ||
module.exports.displaySql = 'select * from 1000 rows (int + string(32))'; | ||
module.exports.requireExecute = true; | ||
module.exports.benchFct = async function (conn, type, deferred) { | ||
const res = await conn.execute('select * from 1000rows'); | ||
deferred.resolve(res); | ||
}; | ||
|
||
module.exports.initFct = function (conn) { | ||
conn.query('DROP TABLE IF EXISTS 1000rows'); | ||
conn.query('CREATE TABLE 1000rows(id INT SIGNED not null primary key auto_increment, val VARCHAR(32))'); | ||
let inserts = []; | ||
for (let i = 0; i < 1000; i++) { | ||
inserts.push(conn.query('INSERT INTO 1000rows(val) VALUES (?) ', ['abcdefghijabcdefghijabcdefghijaa'])); | ||
} | ||
return Promise.all(inserts).catch((e) => { | ||
console.log(e); | ||
throw e; | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.