Skip to content

Commit

Permalink
Adding aggregate workloads for microbenchmark regressions (#70)
Browse files Browse the repository at this point in the history
* Adding aggregate workloads for microbenchmark regressions

* Fixed the reviw comments

* Adding orderby microbenchmarks

---------

Co-authored-by: Shantanu Gupta <[email protected]>
  • Loading branch information
shantanugupta-yb and Shantanu Gupta authored Feb 14, 2023
1 parent b0da946 commit c7bd109
Show file tree
Hide file tree
Showing 36 changed files with 5,932 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
#TEST FOR POSTGRES
#GOAL1 Impact of index type on aggregation
#TESTS:
#Aggregate function count on non indexed column of bigint datatype
#Aggregate function count on pkey column of bigint datatype
#Aggregate function count on secondary indexed column of bigint datatype
type: POSTGRES
driver: org.postgresql.Driver
url: jdbc:postgresql://{{endpoint}}:5432/postgres?sslmode=require
username: {{username}}
password: {{password}}
batchsize: 128
isolation: TRANSACTION_REPEATABLE_READ
loaderthreads: 1
terminals: 1
collect_pg_stat_statements: true
works:
work:
time_secs: 120
active_terminals: 1
rate: unlimited
warmup: 30
microbenchmark:
class: com.oltpbenchmark.benchmarks.featurebench.customworkload.YBDefaultMicroBenchmark
properties:
setAutoCommit: true
create:
- DROP TABLE IF EXISTS nonIndexed1M_1;
- DROP TABLE IF EXISTS pkeyBigint1M_1;
- DROP TABLE IF EXISTS Indexed1M_1;
- CREATE TABLE nonIndexed1M_1(col_bigint_id_1 bigint, col_bigint_1 bigint, col_bigint_2 bigint, col_bigint_3 bigint, col_bigint_4 bigint, col_bigint_5 bigint, col_float2_1 float(2), col_float2_2 float(2), col_float5_1 float(5), col_float5_2 float(5), col_boolean_1 boolean, col_varchar10_id_1 varchar(10), col_varchar100_id_1 varchar(100), col_varchar100_id_2 varchar(100), col_varchar500_id_1 varchar(500));
- CREATE TABLE pkeyBigint1M_1(col_bigint_id_1 bigint, col_bigint_1 bigint, col_bigint_2 bigint, col_bigint_3 bigint, col_bigint_4 bigint, col_bigint_5 bigint, col_float2_1 float(2), col_float2_2 float(2), col_float5_1 float(5), col_float5_2 float(5), col_boolean_1 boolean, col_varchar10_id_1 varchar(10), col_varchar100_id_1 varchar(100), col_varchar100_id_2 varchar(100), col_varchar500_id_1 varchar(500), PRIMARY KEY(col_bigint_id_1));
- CREATE TABLE Indexed1M_1(col_bigint_id_1 bigint, col_bigint_1 bigint, col_bigint_2 bigint, col_bigint_3 bigint, col_bigint_4 bigint, col_bigint_5 bigint, col_float2_1 float(2), col_float2_2 float(2), col_float5_1 float(5), col_float5_2 float(5), col_boolean_1 boolean, col_varchar10_id_1 varchar(10), col_varchar100_id_1 varchar(100), col_varchar100_id_2 varchar(100), col_varchar500_id_1 varchar(500));
- CREATE INDEX ON Indexed1M_1(col_bigint_id_1);
- CREATE INDEX ON Indexed1M_1(col_varchar10_id_1);
- CREATE INDEX ON Indexed1M_1(col_varchar500_id_1);
- CREATE INDEX ON Indexed1M_1(col_float5_1);
cleanup:
- DROP TABLE IF EXISTS nonIndexed1M_1;
- DROP TABLE IF EXISTS pkeyBigint1M_1;
- DROP TABLE IF EXISTS Indexed1M_1;
loadRules:
- table: nonIndexed1M_
count: 1
rows: 1000000
columns:
- name: col_bigint_id_
count: 1
util: PrimaryIntGen
params: [ 1, 1000000 ]
- name: col_bigint_
count: 5
util: RandomNumber
params: [ 1, 1000000 ]
- name: col_float2_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 2 ]
- name: col_float5_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 5 ]
- name: col_boolean_
count: 1
util: RandomBoolean
- name: col_varchar10_id_
count: 1
util: PrimaryStringGen
params: [1, 10]
- name: col_varchar100_id_
count: 2
util: PrimaryStringGen
params: [1, 100]
- name: col_varchar500_id_
count: 1
util: PrimaryStringGen
params: [1, 500]
- table: pkeyBigint1M_
count: 1
rows: 1000000
columns:
- name: col_bigint_id_
count: 1
util: PrimaryIntGen
params: [ 1, 1000000 ]
- name: col_bigint_
count: 5
util: RandomNumber
params: [ 1, 1000000 ]
- name: col_float2_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 2 ]
- name: col_float5_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 5 ]
- name: col_boolean_
count: 1
util: RandomBoolean
- name: col_varchar10_id_
count: 1
util: PrimaryStringGen
params: [1, 10]
- name: col_varchar100_id_
count: 2
util: PrimaryStringGen
params: [1, 100]
- name: col_varchar500_id_
count: 1
util: PrimaryStringGen
params: [1, 500]
- table: Indexed1M_
count: 1
rows: 1000000
columns:
- name: col_bigint_id_
count: 1
util: PrimaryIntGen
params: [ 1, 1000000 ]
- name: col_bigint_
count: 5
util: RandomNumber
params: [ 1, 1000000 ]
- name: col_float2_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 2 ]
- name: col_float5_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 5 ]
- name: col_boolean_
count: 1
util: RandomBoolean
- name: col_varchar10_id_
count: 1
util: PrimaryStringGen
params: [1, 10]
- name: col_varchar100_id_
count: 2
util: PrimaryStringGen
params: [1, 100]
- name: col_varchar500_id_
count: 1
util: PrimaryStringGen
params: [1, 500]
executeRules:
- workload: AGGRG1_count_bigint_non_indexed_column
run:
- name: pg_count_bigint_non_indexed_column
weight: 100
queries:
- query: select count(col_bigint_id_1) from nonIndexed1M_1
- workload: AGGRG1_count_bigint_pkey_column
run:
- name: pg_count_bigint_non_indexed_column
weight: 100
queries:
- query: select count(col_bigint_id_1) from pkeyBigint1M_1
- workload: AGGRG1_count_bigint_secondary_indexed_column
run:
- name: pg_count_bigint_non_indexed_column
weight: 100
queries:
- query: select count(col_bigint_id_1) from Indexed1M_1
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
#TEST FOR POSTGRES
#GOAL1 Impact of increasing rows on count aggregate
#TESTS:
#Aggregate function count on 0.1M rows
#Aggregate function count on 1M rows
#Aggregate function count on 10M rows
type: POSTGRES
driver: org.postgresql.Driver
url: jdbc:postgresql://{{endpoint}}:5432/postgres?sslmode=require
username: {{username}}
password: {{password}}
batchsize: 128
isolation: TRANSACTION_REPEATABLE_READ
loaderthreads: 1
terminals: 1
collect_pg_stat_statements: true
works:
work:
time_secs: 120
active_terminals: 1
rate: unlimited
warmup: 30
microbenchmark:
class: com.oltpbenchmark.benchmarks.featurebench.customworkload.YBDefaultMicroBenchmark
properties:
setAutoCommit: true
create:
- DROP TABLE IF EXISTS pkeyBigint1M_1;
- DROP TABLE IF EXISTS pkeyBigint1L_1;
- DROP TABLE IF EXISTS pkeyBigint10M_1;
- CREATE TABLE pkeyBigint1L_1(col_bigint_id_1 bigint, col_bigint_1 bigint, col_bigint_2 bigint, col_bigint_3 bigint, col_bigint_4 bigint, col_bigint_5 bigint, col_float2_1 float(2), col_float2_2 float(2), col_float5_1 float(5), col_float5_2 float(5), col_boolean_1 boolean, col_varchar10_id_1 varchar(10), col_varchar100_id_1 varchar(100), col_varchar100_id_2 varchar(100), col_varchar500_id_1 varchar(500), PRIMARY KEY(col_bigint_id_1));
- CREATE TABLE pkeyBigint1M_1(col_bigint_id_1 bigint, col_bigint_1 bigint, col_bigint_2 bigint, col_bigint_3 bigint, col_bigint_4 bigint, col_bigint_5 bigint, col_float2_1 float(2), col_float2_2 float(2), col_float5_1 float(5), col_float5_2 float(5), col_boolean_1 boolean, col_varchar10_id_1 varchar(10), col_varchar100_id_1 varchar(100), col_varchar100_id_2 varchar(100), col_varchar500_id_1 varchar(500), PRIMARY KEY(col_bigint_id_1));
- CREATE TABLE pkeyBigint10M_1(col_bigint_id_1 bigint, col_bigint_1 bigint, col_bigint_2 bigint, col_bigint_3 bigint, col_bigint_4 bigint, col_bigint_5 bigint, col_float2_1 float(2), col_float2_2 float(2), col_float5_1 float(5), col_float5_2 float(5), col_boolean_1 boolean, col_varchar10_id_1 varchar(10), col_varchar100_id_1 varchar(100), col_varchar100_id_2 varchar(100), col_varchar500_id_1 varchar(500), PRIMARY KEY(col_bigint_id_1));
cleanup:
- DROP TABLE IF EXISTS pkeyBigint1M_1;
- DROP TABLE IF EXISTS pkeyBigint1L_1;
- DROP TABLE IF EXISTS pkeyBigint10M_1;
loadRules:
- table: pkeyBigint1L_
count: 1
rows: 100000
columns:
- name: col_bigint_id_
count: 1
util: PrimaryIntGen
params: [ 1, 100000 ]
- name: col_bigint_
count: 5
util: RandomNumber
params: [ 1, 100000 ]
- name: col_float2_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 100000, 2 ]
- name: col_float5_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 100000, 5 ]
- name: col_boolean_
count: 1
util: RandomBoolean
- name: col_varchar10_id_
count: 1
util: PrimaryStringGen
params: [1, 10]
- name: col_varchar100_id_
count: 2
util: PrimaryStringGen
params: [1, 100]
- name: col_varchar500_id_
count: 1
util: PrimaryStringGen
params: [1, 500]
- table: pkeyBigint1M_
count: 1
rows: 1000000
columns:
- name: col_bigint_id_
count: 1
util: PrimaryIntGen
params: [ 1, 1000000 ]
- name: col_bigint_
count: 5
util: RandomNumber
params: [ 1, 1000000 ]
- name: col_float2_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 2 ]
- name: col_float5_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 1000000, 5 ]
- name: col_boolean_
count: 1
util: RandomBoolean
- name: col_varchar10_id_
count: 1
util: PrimaryStringGen
params: [1, 10]
- name: col_varchar100_id_
count: 2
util: PrimaryStringGen
params: [1, 100]
- name: col_varchar500_id_
count: 1
util: PrimaryStringGen
params: [1, 500]
- table: pkeyBigint10M_
count: 1
rows: 10000000
columns:
- name: col_bigint_id_
count: 1
util: PrimaryIntGen
params: [ 1, 10000000 ]
- name: col_bigint_
count: 5
util: RandomNumber
params: [ 1, 10000000 ]
- name: col_float2_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 10000000, 2 ]
- name: col_float5_
count: 2
util: RandomNoWithDecimalPoints
params: [ 1, 10000000, 5 ]
- name: col_boolean_
count: 1
util: RandomBoolean
- name: col_varchar10_id_
count: 1
util: PrimaryStringGen
params: [1, 10]
- name: col_varchar100_id_
count: 2
util: PrimaryStringGen
params: [1, 100]
- name: col_varchar500_id_
count: 1
util: PrimaryStringGen
params: [1, 500]
executeRules:
- workload: AGGRG2_count_bigint_1L_table_rows
run:
- name: pg_count_bigint_non_indexed_column
weight: 100
queries:
- query: select count(col_bigint_id_1) from pkeyBigint1L_1
- workload: AGGRG2_count_bigint_1M_table_rows
run:
- name: pg_count_bigint_1M_table_rows
weight: 100
queries:
- query: select count(col_bigint_id_1) from pkeyBigint1M_1
- workload: AGGRG2_count_bigint_10M_table_rows
run:
- name: pg_count_bigint_10M_table_rows
weight: 100
queries:
- query: select count(col_bigint_id_1) from pkeyBigint10M_1
Loading

0 comments on commit c7bd109

Please sign in to comment.