Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated benchmarks databases and scripts #9597

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ protected void setupDatabase(String dbName) {
@BeforeAll
public static void beforeAll() {
AbstractSourcePerformanceTest.testArgs = Stream.of(
Arguments.of("test1000tables240columns200recordsDb", "dbo", 200, 240, 1000),
Arguments.of("newregular25tables50000records", "dbo", 50000, 8, 25),
Arguments.of("newsmall1000tableswith10000rows", "dbo", 10000, 8, 1000));
Arguments.of("t1000_c240_r200", "dbo", 200, 240, 1000),
Arguments.of("t25_c8_r50k_s10kb", "dbo", 50000, 8, 25),
Arguments.of("t1000_c8_r10k_s500b", "dbo", 10000, 8, 1000));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ DECLARE @fullloop INT;

DECLARE @fullloopcounter INT;
SET
@dummyIpsum = '''dummy_ipsum'''
SET
@vmax = @allrows;
SET
@vmaxx = @allrows;
Expand All @@ -74,8 +72,8 @@ SET
@fullloop = 0;
SET
@fullloopcounter = 0;

while @vmaxx <= @vmaxoneinsert BEGIN
SET
@dummyIpsum = '''dummy_ipsum''' while @vmaxx <= @vmaxoneinsert BEGIN
SET
@vmaxoneinsert = @vmaxx;
SET
Expand All @@ -97,7 +95,7 @@ DECLARE @insertTable NVARCHAR(MAX)
SET
@insertTable = CONVERT(
NVARCHAR(MAX),
'insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longblobfield, timestampfield) values ('
'insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longtextfield, timestampfield) values ('
);

while @counter < @vmaxoneinsert BEGIN
Expand Down Expand Up @@ -159,7 +157,7 @@ DECLARE @insertTableLasted NVARCHAR(MAX);
SET
@insertTableLasted = CONVERT(
NVARCHAR(MAX),
'insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longblobfield, timestampfield) values ('
'insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longtextfield, timestampfield) values ('
);

while @lastinsertcounter < @lastinsert BEGIN
Expand Down Expand Up @@ -231,7 +229,7 @@ CREATE
varchar3 VARCHAR(255),
varchar4 VARCHAR(255),
varchar5 VARCHAR(255),
longblobfield nvarchar(MAX),
longtextfield nvarchar(MAX),
timestampfield datetime2(0)
);

Expand All @@ -242,45 +240,49 @@ DECLARE @smallText NVARCHAR(MAX);
DECLARE @regularText NVARCHAR(MAX);

DECLARE @largeText NVARCHAR(MAX);

DECLARE @someText nvarchar(MAX);

SELECT
@someText = N'some text, some text, ';
SET
@extraSmallText = N'''test weight 50b - some text, some text, some text''';
SET
@extraSmallText = '''test weight 50b - 50b text, 50b text, 50b text'''
@smallText = N'''test weight 500b - ';
SET
@smallText = CONCAT(
'''test weight 500b - ',
REPLICATE(
'some text, some text, ',
@regularText = N'''test weight 10kb - ';
SET
@largeText = N'''test weight 100kb - ';

SELECT
@smallText = @smallText + REPLICATE(
@someText,
20
),
''''
)
SET
@regularText = CONCAT(
'''test weight 10kb - ',
REPLICATE(
'some text, some text, some text, some text, ',
295
),
'some text'''
)
SET
@largeText = CONCAT(
'''test weight 100kb - ',
REPLICATE(
'some text, some text, some text, some text, ',
2225
),
'some text'''
)+ N'''';

SELECT
@regularText = @regularText + REPLICATE(
@someText,
590
)+ N'some text''';

SELECT
@largeText = @largeText + REPLICATE(
@someText,
4450
)+ N'some text''';

) -- TODO: change the following @allrows to control the number of records with different sizes
-- number of 50B records
EXEC insert_rows @allrows = 0,
@insertcount = 998,
@value = @extraSmallText -- number of 500B records
EXEC insert_rows @allrows = 0,
@insertcount = 998,
@value = @smallText -- number of 10KB records
@value = @smallText -- number of 10Kb records
EXEC insert_rows @allrows = 0,
@insertcount = 998,
@value = @regularText -- number of 100KB records
@value = @regularText -- number of 100Kb records
EXEC insert_rows @allrows = 0,
@insertcount = 98,
@value = @largeText
Expand All @@ -300,4 +302,4 @@ DROP
PROCEDURE IF EXISTS table_copy;

EXEC sp_rename 'test',
'test_0';
'test_0';
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ protected void setupDatabase(String dbName) throws Exception {
@BeforeAll
public static void beforeAll() {
AbstractSourcePerformanceTest.testArgs = Stream.of(
Arguments.of("test1000tables240columns200recordsDb", "test1000tables240columns200recordsDb", 200, 240, 1000),
Arguments.of("newregular25tables50000records", "newregular25tables50000records", 50000, 8, 25),
Arguments.of("newsmall1000tableswith10000rows", "newsmall1000tableswith10000rows", 10000, 8, 1000));
Arguments.of("t1000_c240_r200", "t1000_c240_r200", 200, 240, 1000),
Arguments.of("t25_c8_r50k_s10kb", "t25_c8_r50k_s10kb", 50000, 8, 25),
Arguments.of("t1000_c8_r10k_s500b", "t1000_c8_r10k_s500b", 10000, 8, 1000));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ END while;

COMMIT;
SET
@insertTable = concat('insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longblobfield, timestampfield) values (');
@insertTable = concat('insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longtextfield, timestampfield) values (');

while @counter < @vmaxoneinsert do
SET
Expand Down Expand Up @@ -141,7 +141,7 @@ END while;

COMMIT;
SET
@insertTableLasted = concat('insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longblobfield, timestampfield) values (');
@insertTableLasted = concat('insert into test (varchar1, varchar2, varchar3, varchar4, varchar5, longtextfield, timestampfield) values (');

while @lastinsertcounter < @lastinsert do
SET
Expand Down Expand Up @@ -206,7 +206,7 @@ delimiter # CREATE
varchar3 VARCHAR(255),
varchar4 VARCHAR(255),
varchar5 VARCHAR(255),
longblobfield longblob,
longtextfield longtext,
timestampfield TIMESTAMP
) engine = innodb;
SET
Expand Down Expand Up @@ -277,4 +277,4 @@ DROP
PROCEDURE IF EXISTS table_copy;

ALTER TABLE
test RENAME test_0;
test RENAME test_0;
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
public class PostgresRdsSourcePerformanceTest extends AbstractSourcePerformanceTest {

private static final String PERFORMANCE_SECRET_CREDS = "secrets/performance-config.json";
private static final List<String> SCHEMAS = List.of("test1000tables240columns200recordsDb",
"newregular25tables50000records", "newsmall1000tableswith10000rows");
private static final List<String> SCHEMAS = List.of("t1000_c240_r200",
"t25_c8_r50k_s10kb", "t1000_c8_r10k_s500b");

@Override
protected String getImageName() {
Expand All @@ -37,8 +37,8 @@ protected void setupDatabase(String dbName) {
config = Jsons.jsonNode(ImmutableMap.builder()
.put("host", plainConfig.get("host"))
.put("port", plainConfig.get("port"))
.put("database", plainConfig.get("database"))
.put("schemas", SCHEMAS)
.put("database", dbName)
.put("schemas", List.of(dbName))
.put("username", plainConfig.get("username"))
.put("password", plainConfig.get("password"))
.put("ssl", true)
Expand Down