An Experimental Analysis of Different Key-Value Stores and Relational Databases
David Gembalczyk Felix Martin Schuhknecht Jens Dittrich BTW 2017 Information Systems Group, Saarland University infosys.uni-saarland.de
An Experimental Analysis of Di ff erent Key-Value Stores and - - PowerPoint PPT Presentation
BTW 2017 An Experimental Analysis of Di ff erent Key-Value Stores and Relational Databases David Gembalczyk Felix Martin Schuhknecht Jens Dittrich Information Systems Group, Saarland University infosys.uni-saarland.de BTW 2017 An
David Gembalczyk Felix Martin Schuhknecht Jens Dittrich BTW 2017 Information Systems Group, Saarland University infosys.uni-saarland.de
David Gembalczyk Felix Martin Schuhknecht Jens Dittrich BTW 2017 Information Systems Group, Saarland University infosys.uni-saarland.de
2/20
2/20
2/20
2/20
2/20
2/20
2/20
2/20
3/20
3/20
3/20
3/20
3/20
3/20
4/20
Primary Key A B C 1 a1 b1 c1 2 a2 b2 c2
Relational Table
4/20
Primary Key A B C 1 a1 b1 c1 2 a2 b2 c2
Relational Table PostgreSQL, MonetDB, Hyper
4/20
Primary Key A B C 1 a1 b1 c1 2 a2 b2 c2
Relational Table PostgreSQL, MonetDB, Hyper
N_NATIONKEY(integer) N_NAME(char(25)) N_REGIONKEY(integer) N_COMMENT(varchar(152))) 123 “Germany” 5 “some comment” ... ... ... ...
TPC-H NATION
4/20
“any string”
Key Value
“any string”
5/20
“any string”
Key
[ “a”, “b”, “c”, “d”]
Value 5/20
“any string”
Key Value
{ ( 0.5, „a“ ), { ( 1.0, „c“ ), { ( 1.5, „b“ ), { ( 2.0, „d“ ) }
5/20
“any string”
Key Value
[ “1” ➞ “a“ , [ “2” ➞ “b“, [ “3” ➞ “c“, [ “4” ➞ “d“ ]
5/20
“any string”
Key Value
[ “1” ➞ “a“ , [ “2” ➞ “b“, [ “3” ➞ “c“, [ “4” ➞ “d“ ] “NATION_123”
Key Value
[ N_NAME ➞ “Germany“ , [ N_REGIONKEY ➞ “5“, [ N_COMMENT ➞ “some comment“ ] TPC-H NATION
5/20
6/20
“any string 1”
Key 6/20
“any string 1”
Key Value Bin
“binA”: “a”
Bin
“binB”: 42
Bin
“binC”: [“a”, “b”, “c”]
6/20
“any string 1”
Key Value Bin
“binA”: “a”
Bin
“binB”: 42
Bin
“binC”: [“a”, “b”, “c”]
Value Bin
“binB”: “b”
Bin
“sub”: {“binD”: “d”, “binE”: “e”} “any string 2”
Key 6/20
“any string 1”
Key Value Bin
“binA”: “a”
Bin
“binB”: 42
Bin
“binC”: [“a”, “b”, “c”] Column?
Value Bin
“binB”: “b”
Bin
“sub”: {“binD”: “d”, “binE”: “e”} “any string 2”
Key 6/20
“any string 1”
Key Value Bin
“binA”: “a”
Bin
“binB”: 42
Bin
“binC”: [“a”, “b”, “c”] Column?
Value Bin
“binB”: “b”
Bin
“sub”: {“binD”: “d”, “binE”: “e”} “any string 2”
Key 6/20
“any string 1”
Key Value Bin
“binA”: “a”
Bin
“binB”: 42
Bin
“binC”: [“a”, “b”, “c”]
Set
Column?
Value Bin
“binB”: “b”
Bin
“sub”: {“binD”: “d”, “binE”: “e”} “any string 2”
Key 6/20
“any string 1”
Key Value Bin
“binA”: “a”
Bin
“binB”: 42
Bin
“binC”: [“a”, “b”, “c”]
Set
Column? Table?
Value Bin
“binB”: “b”
Bin
“sub”: {“binD”: “d”, “binE”: “e”} “any string 2”
Key 6/20
“any string 1”
Key Value Bin
“binA”: “a”
Bin
“binB”: 42
Bin
“binC”: [“a”, “b”, “c”]
Set
Column? Table?
Value Bin
“binB”: “b”
Bin
“sub”: {“binD”: “d”, “binE”: “e”} “any string 2”
Key
123
Key Value Bin
N_NAME: “Germany”
Bin
N_REGIONKEY: 5
Bin
N_COMMENT: “some comment” TPC-H NATION
Set 6/20
7/20
HSTORE
Key Value 1 [ “A” ➞ “a1”, “B” ➞ “b1”, “C” ➞ “c1” ] 7/20
HSTORE
Key Value 1 [ “A” ➞ “a1”, “B” ➞ “b1”, “C” ➞ “c1” ]
JSONB
Key Value 1 { “A”: “a1”, “B”: “b1”, “C”: “c1” } 2 { “A”: “a2”, “B”: “b2”, “C”: “c2”, “sub”: { “D”: “d” “E”: “e” } } 7/20
HSTORE
Key Value 1 [ “A” ➞ “a1”, “B” ➞ “b1”, “C” ➞ “c1” ]
JSONB
Key Value 1 { “A”: “a1”, “B”: “b1”, “C”: “c1” } 2 { “A”: “a2”, “B”: “b2”, “C”: “c2”, “sub”: { “D”: “d” “E”: “e” } } Key Value 123 [ “N_NAME” ➞ “Germany”, “N_REGIONKEY” ➞ “5”, “N_COMMENT” ➞ “some comment” ] Key Value 123 [ “N_NAME”: “Germany”, “N_REGIONKEY”: 5, “N_COMMENT”: “some comment” ] 7/20
8/20
8/20
RAM-disk enlarge caches warm-up run
8/20
RAM-disk enlarge caches warm-up run
Custom Interface(s)
8/20
RAM-disk enlarge caches warm-up run
Custom Interface(s)
8/20
RAM-disk enlarge caches warm-up run
Custom Interface(s)
1 2 3 4 1 2 3 4
8/20
9/20
LINEITEM LINEITEMKEY ORDERKEY PARTKEY SUPPKEY LINENUMBER QUANTITY EXTENDEDPRICE DISCOUNT TAX RETURNFLAG LINESTATUS SHIPDATE COMMITDATE RECEIPTDATE SHIPINSTRUCT SHIPMODE COMMENT PARTSUPP PARTSUPPKEY PARTKEY SUPPKEY AVAILQTY SUPPLYCOST COMMENT
modified TPC-H
9/20
LINEITEM LINEITEMKEY ORDERKEY PARTKEY SUPPKEY LINENUMBER QUANTITY EXTENDEDPRICE DISCOUNT TAX RETURNFLAG LINESTATUS SHIPDATE COMMITDATE RECEIPTDATE SHIPINSTRUCT SHIPMODE COMMENT PARTSUPP PARTSUPPKEY PARTKEY SUPPKEY AVAILQTY SUPPLYCOST COMMENT
modified TPC-H Scale Factor 1
9/20
LINEITEM LINEITEMKEY ORDERKEY PARTKEY SUPPKEY LINENUMBER QUANTITY EXTENDEDPRICE DISCOUNT TAX RETURNFLAG LINESTATUS SHIPDATE COMMITDATE RECEIPTDATE SHIPINSTRUCT SHIPMODE COMMENT PARTSUPP PARTSUPPKEY PARTKEY SUPPKEY AVAILQTY SUPPLYCOST COMMENT
modified TPC-H Scale Factor 1 warm-up run 3 measurement runs 50,000 ops/run
9/20
LINEITEM LINEITEMKEY ORDERKEY PARTKEY SUPPKEY LINENUMBER QUANTITY EXTENDEDPRICE DISCOUNT TAX RETURNFLAG LINESTATUS SHIPDATE COMMITDATE RECEIPTDATE SHIPINSTRUCT SHIPMODE COMMENT PARTSUPP PARTSUPPKEY PARTKEY SUPPKEY AVAILQTY SUPPLYCOST COMMENT
modified TPC-H Scale Factor 1 warm-up run 3 measurement runs 50,000 ops/run
Intel Xeon X5690 Intel Xeon X5690 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 3.47 GHz 96GB RAM 96GB RAM
9/20
jdbc.executeQuery( "SELECT 1;" ); // Relational DBs redis.echo( "1" ); // Redis aerospike.exists( non_existing_key ); // Aerospike
2 4 6 8 10 12 14 16 18 20 100 000 200 000 300 000 400 000 500 000 Clients Performance [Q/sec]
PostgreSQL MonetDB HyPer (Demo) Aerospike Redis
10/20
jdbc.executeQuery( "SELECT 1;" ); // Relational DBs redis.echo( "1" ); // Redis aerospike.exists( non_existing_key ); // Aerospike
PostgreSQL MonetDB HyPer (Demo) Aerospike Redis
10/
2 4 6 8 10 12 14 16 18 20 100 000 200 000 300 000 400 000 500 000 Clients Performance [Q/sec]
YCSB
NO-DB CUSTOM
20
Batch Size 1 50,000 Inserts into LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
12/20
Batch Size 1 50,000 Inserts into LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
12/20
Batch Size 1 50,000 Inserts into LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
12/20
Batch Size 1 50,000 Inserts into LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
12/20
50,000 Inserts into LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis HyPer (Demo) b MonetDB
Single Client
1 10 100 1 000 100 1 000 10 000 100 000 Batch Size Performance [ops/sec]
13/20
50,000 Inserts into LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis HyPer (Demo) b MonetDB
Single Client
1 10 100 1 000 100 1 000 10 000 100 000 Batch Size Performance [ops/sec]
13/20
50,000 Deletes in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Batch Size 1
2 4 6 8 10 12 14 16 18 20 100 000 200 000 300 000 400 000 Clients Performance [ops/sec]
14/20
50,000 Deletes in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Batch Size 1
2 4 6 8 10 12 14 16 18 20 100 000 200 000 300 000 400 000 Clients Performance [ops/sec]
14/20
50,000 Deletes in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Batch Size 1
2 4 6 8 10 12 14 16 18 20 100 000 200 000 300 000 400 000 Clients Performance [ops/sec]
14/20
50,000 Point-Queries in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Batch Size 1
16/20
50,000 Point-Queries in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Batch Size 1
16/20
50,000 Point-Queries in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Batch Size 1
16/20
50,000 Point-Queries in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Single Client
17/20
50,000 Point-Queries in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Single Client
17/20
50,000 Point-Queries in LINEITEM and ORDERS
PG-row PG-hstore PG-jsonb Aerospike Redis
Single Client
17/20
1 10 100 1 000 20 000 40 000 60 000 80 000 100 000 Range Size Performance [ops/sec]
PG-row PG-hstore PG-jsonb Aerospike Redis
SELECT MAX([ ps_supplycost | o_totalprice | l_discount ]) FROM [PARTSUPP | ORDERS | LINEITEM]
8 Clients
18/20
1 10 100 1 000 20 000 40 000 60 000 80 000 100 000 Range Size Performance [ops/sec]
PG-row PG-hstore PG-jsonb Aerospike Redis
SELECT MAX([ ps_supplycost | o_totalprice | l_discount ]) FROM [PARTSUPP | ORDERS | LINEITEM] WHERE [ ps_partkey | o_custkey | l_orderkey ] = value
if Range Size = 1
8 Clients
18/20
1 10 100 1 000 20 000 40 000 60 000 80 000 100 000 Range Size Performance [ops/sec]
PG-row PG-hstore PG-jsonb Aerospike Redis
SELECT MAX([ ps_supplycost | o_totalprice | l_discount ]) FROM [PARTSUPP | ORDERS | LINEITEM] WHERE [ ps_partkey | o_custkey | l_orderkey ] = value
if Range Size = 1
WHERE start <= [ ps_partkey | o_custkey | l_orderkey ] AND [ ps_partkey | o_custkey | l_orderkey ] <= end
if Range Size ≥ 1
8 Clients
18/20
1 10 100 1 000 20 000 40 000 60 000 80 000 100 000 Range Size Performance [ops/sec]
PG-row PG-hstore PG-jsonb Aerospike Redis
SELECT MAX([ ps_supplycost | o_totalprice | l_discount ]) FROM [PARTSUPP | ORDERS | LINEITEM] WHERE [ ps_partkey | o_custkey | l_orderkey ] = value
if Range Size = 1
WHERE start <= [ ps_partkey | o_custkey | l_orderkey ] AND [ ps_partkey | o_custkey | l_orderkey ] <= end
if Range Size ≥ 1
8 Clients
18/20
PG-row PG-hstore PG-jsonb Aerospike Redis HyPer (Demo) b MonetDB
19/20
PG-row PG-hstore PG-jsonb Aerospike Redis HyPer (Demo) b MonetDB
19/20
PG-row PG-hstore PG-jsonb Aerospike Redis HyPer (Demo) b MonetDB
19/20
PG-row PG-hstore PG-jsonb Aerospike Redis HyPer (Demo) b MonetDB
19/20
20/20
UDF support
20/20
UDF support secondary index support
20/20
UDF support secondary index support build-in data structures
20/20
UDF support secondary index support bulk operations build-in data structures
20/20
UDF support secondary index support bulk operations build-in data structures HSTORE
20/20
UDF support secondary index support bulk operations build-in data structures HSTORE JSONB
20/20