diff --git a/airbyte-integrations/connectors/source-mssql/src/test-performance/java/io/airbyte/integrations/source/mssql/MsSqlRdsSourcePerformanceSecretTest.java b/airbyte-integrations/connectors/source-mssql/src/test-performance/java/io/airbyte/integrations/source/mssql/MsSqlRdsSourcePerformanceSecretTest.java index cb056dd29a5f8..ae5dc98a4f443 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test-performance/java/io/airbyte/integrations/source/mssql/MsSqlRdsSourcePerformanceSecretTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test-performance/java/io/airbyte/integrations/source/mssql/MsSqlRdsSourcePerformanceSecretTest.java @@ -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)); } } diff --git a/airbyte-integrations/connectors/source-mssql/src/test-performance/sql/create_mssql_benchmarks.sql b/airbyte-integrations/connectors/source-mssql/src/test-performance/sql/create_mssql_benchmarks.sql index 2c55ca5203c66..e1e0870f27ed4 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test-performance/sql/create_mssql_benchmarks.sql +++ b/airbyte-integrations/connectors/source-mssql/src/test-performance/sql/create_mssql_benchmarks.sql @@ -57,8 +57,6 @@ DECLARE @fullloop INT; DECLARE @fullloopcounter INT; SET -@dummyIpsum = '''dummy_ipsum''' -SET @vmax = @allrows; SET @vmaxx = @allrows; @@ -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 @@ -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 @@ -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 @@ -231,7 +229,7 @@ CREATE varchar3 VARCHAR(255), varchar4 VARCHAR(255), varchar5 VARCHAR(255), - longblobfield nvarchar(MAX), + longtextfield nvarchar(MAX), timestampfield datetime2(0) ); @@ -242,34 +240,38 @@ 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, @@ -277,10 +279,10 @@ EXEC insert_rows @allrows = 0, @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 @@ -300,4 +302,4 @@ DROP PROCEDURE IF EXISTS table_copy; EXEC sp_rename 'test', -'test_0'; +'test_0'; \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-mysql/src/test-performance/java/io/airbyte/integrations/source/mysql/MySqlRdsSourcePerformanceSecretTest.java b/airbyte-integrations/connectors/source-mysql/src/test-performance/java/io/airbyte/integrations/source/mysql/MySqlRdsSourcePerformanceSecretTest.java index 3a1a552a46a2b..6cf5c2fc43cce 100644 --- a/airbyte-integrations/connectors/source-mysql/src/test-performance/java/io/airbyte/integrations/source/mysql/MySqlRdsSourcePerformanceSecretTest.java +++ b/airbyte-integrations/connectors/source-mysql/src/test-performance/java/io/airbyte/integrations/source/mysql/MySqlRdsSourcePerformanceSecretTest.java @@ -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)); } } diff --git a/airbyte-integrations/connectors/source-mysql/src/test-performance/sql/create_mysql_benchmarks.sql b/airbyte-integrations/connectors/source-mysql/src/test-performance/sql/create_mysql_benchmarks.sql index f4de7715e15e2..b24773e849771 100644 --- a/airbyte-integrations/connectors/source-mysql/src/test-performance/sql/create_mysql_benchmarks.sql +++ b/airbyte-integrations/connectors/source-mysql/src/test-performance/sql/create_mysql_benchmarks.sql @@ -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 @@ -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 @@ -206,7 +206,7 @@ delimiter # CREATE varchar3 VARCHAR(255), varchar4 VARCHAR(255), varchar5 VARCHAR(255), - longblobfield longblob, + longtextfield longtext, timestampfield TIMESTAMP ) engine = innodb; SET @@ -277,4 +277,4 @@ DROP PROCEDURE IF EXISTS table_copy; ALTER TABLE - test RENAME test_0; + test RENAME test_0; \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-postgres/src/test-performance/java/io/airbyte/integrations/source/postgres/PostgresRdsSourcePerformanceTest.java b/airbyte-integrations/connectors/source-postgres/src/test-performance/java/io/airbyte/integrations/source/postgres/PostgresRdsSourcePerformanceTest.java index dff446f51cfde..2798dda944136 100644 --- a/airbyte-integrations/connectors/source-postgres/src/test-performance/java/io/airbyte/integrations/source/postgres/PostgresRdsSourcePerformanceTest.java +++ b/airbyte-integrations/connectors/source-postgres/src/test-performance/java/io/airbyte/integrations/source/postgres/PostgresRdsSourcePerformanceTest.java @@ -18,8 +18,8 @@ public class PostgresRdsSourcePerformanceTest extends AbstractSourcePerformanceTest { private static final String PERFORMANCE_SECRET_CREDS = "secrets/performance-config.json"; - private static final List SCHEMAS = List.of("test1000tables240columns200recordsDb", - "newregular25tables50000records", "newsmall1000tableswith10000rows"); + private static final List SCHEMAS = List.of("t1000_c240_r200", + "t25_c8_r50k_s10kb", "t1000_c8_r10k_s500b"); @Override protected String getImageName() { @@ -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)