View
222
Download
0
Embed Size (px)
Citation preview
Database Test Casesor
Why We Chose Neo4j? KUBID SYSTEMS & POWERNIGHT GMBH
AboutKUBID Systems & Powernight GmbH KUBID Systems & Powernight GmbH was founded 2007 in
cooperation with BMVIT (Austrian Federal Ministry for Transport, Innovation and Technology)
Specialist in electronic loyalty and voucher systems Market leader in Austria and Germany in this area Around 2.400 customer companies currently using our system Around 15.000 transactions per day
Databases Databases used in our test cases:
Amazon Aurora Amazon Dynamo Cassandra 2.2.0 MySQL 5.6.26 Neo4j 2.2.5 PostgreSQL 9.4.4
Test Goals Evaluation of different databases regarding speed and time for
importing, deleting and querying data which is organized in a logical tree structure.
In our application we need to access multiple levels of child and parent nodes to calculate properties of each node (multiple times)
Test Setup We used Amazon EC2 instances “t2.small” with 2 GB Memory and 30 GB storage for Cassandra, MySQL,
Neo4j and PostgreSQL We used Amazon EC2 instances “r3.large” with 15 GB Memory and 30 GB storage for Amazon Aurora We used 2000 Read and Write Capacity Units for Amazon DynamoDB We used Debian Jessie as operating system Test data was imported from .csv files For delete and query statements we used language specific commands (SQL, Cypher, ..) Indexes on unique values that exist in a particular column/properties (e.g. id, parent) We used primary and secondary index if database allowed Running cmd line-scripts, tools:
Amazon Aurora - AWS Command Line Interface (AWS CLI) Amazon Dynamo - AWS Command Line Interface(AWS CLI) Cassandra – Command Line Tool (cqlsh) MySQL – Command Line Tool (mysql) Neo4j - Neo4j Shell (neo4j-shell) PostgreSQL - Command Line Tool (psql)
Import and Delete15.000 Rows
DB Import Deleted Amazon Aurora 1.800 seconds 0.523 seconds
Amazon Dynamo 94.602 seconds 89.490 secondsCassandra 1.657 seconds 0.385 seconds
MySQL 4.349 seconds 16.313 secondsNeo4j 0.503 seconds 0.453 seconds
PostgreSQL 0.080 seconds 0.0435 seconds
Import and Delete50.000 Rows
DB Import Deleted Amazon Aurora 2.989 seconds 0.651 seconds
Amazon Dynamo 2200.160 seconds 2394.020 secondsCassandra 2.907 seconds 1.031 seconds
MySQL 9.466 seconds 16.917 secondsNeo4j 1.838 seconds 1.797 seconds
PostgreSQL 0.275 seconds 0.094 seconds
Import and Delete100.000 Rows
DB Import Deleted Amazon Aurora 5.979 seconds 0.903 seconds
Amazon Dynamo 3699.483 seconds 3839.117 secondsCassandra 5.939 seconds 1.056 seconds
MySQL 23.771 seconds 23.922 secondsNeo4j 2.566 seconds 3.259 seconds
PostgreSQL 0.448 seconds 0.128 seconds
Import and Delete250.000 Rows
DB Import Deleted Amazon Aurora 13.549 seconds 1.858 seconds
Amazon Dynamo 9699.511 seconds 9739.145 secondsCassandra 12.073 seconds 1.375 seconds
MySQL 50.957 seconds 29.884 secondsNeo4j 4.288 seconds 3.805 seconds
PostgreSQL 1.279 seconds 0.337 seconds
Import and Delete500.000 Rows
DB Import Deleted Amazon Aurora 25.098 seconds 3.917 seconds
Amazon Dynamo 19399.022 seconds 19538.656 secondsCassandra 21.957 seconds 1.771 seconds
MySQL 55.808 seconds 34.199 secondsNeo4j 8.670 seconds 7.611seconds
PostgreSQL 2.422 seconds 0.993 seconds
Import and Delete1.000.000 Rows
DB Import Deleted Amazon Aurora 45.897 seconds 8.837 seconds
Amazon Dynamo 6583.352 seconds 6019.043 secondsCassandra 43.950 seconds. 2.022 seconds
MySQL 70.583 seconds 46.203 secondsNeo4j 10.102 seconds 9.222 seconds
PostgreSQL 4.703 seconds 2.077 seconds
Import and Delete2.000.000 Rows
DB Import Deleted Amazon Aurora Not tested because previous
performance was too low and expensive
Not tested because previous performance was too low
and expensiveAmazon Dynamo Not tested because previous
performance was too low and expensive
Not tested because previous performance was too low
and expensiveCassandra 96.659 seconds 2.714 seconds
MySQL 84.566 seconds 87.496 secondsNeo4j 21.663 seconds 20.445 seconds
PostgreSQL 5.773 seconds 3.978 seconds
Import and Delete5.000.000 Rows
DB Import Deleted Amazon Aurora Not tested because previous
performance was too low and expensive
Not tested because previous performance was too low
and expensiveAmazon Dynamo Not tested because previous
performance was too low and expensive
Not tested because previous performance was too low
and expensiveCassandra 194.936 seconds 3.813 seconds
MySQL 241.954 seconds 145.150 secondsNeo4j 52.659 seconds 44.891 seconds
PostgreSQL 23.764 seconds 17.328 seconds
Import and Delete10.000.000 Rows
DB Import Deleted Amazon Aurora Not tested because previous
performance was too low and expensive
Not tested because previous performance was too low
and expensiveAmazon Dynamo Not tested because previous
performance was too low and expensive
Not tested because previous performance was too low
and expensiveCassandra 314.084 seconds 4.443 seconds
MySQL 716.830 seconds 537.686 secondsNeo4j 76.982 seconds 61.783 seconds
PostgreSQL 62.924 seconds 50.706 seconds
Query 15.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 0.155 seconds
MySQL 11.034 secondsNeo4j 0.013 seconds
PostgreSQL 0.054 seconds
Query 50.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 0.490 seconds
MySQL 11.118 secondsNeo4j 0.022 seconds
PostgreSQL 0.056 seconds
Query 100.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 0.755 seconds
MySQL 11.191 secondsNeo4j 0.034 seconds
PostgreSQL 0.057 seconds
Query 250.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 0.778 seconds
MySQL 11.219 secondsNeo4j 0.040 seconds
PostgreSQL 0.058 seconds
Query 500.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 0.916 seconds
MySQL 11.323 secondsNeo4j 0.043 seconds
PostgreSQL 0.058 seconds
Query 1.000.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 0.936 seconds
MySQL 11.354 secondsNeo4j 0.044 seconds
PostgreSQL 0.058 seconds
Query 2.000.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 1.287 seconds
MySQL 11.674 secondsNeo4j 0.050 seconds
PostgreSQL 0.059 seconds
Query 5.000.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 2.575 seconds
MySQL 11.738 secondsNeo4j 0.055 seconds
PostgreSQL 0.061 seconds
Query 10.000.000 Rows Finding root node(s) and counting their immediate children
DB Query timeCassandra 3.151 seconds
MySQL 11.806 secondsNeo4j 0.059 seconds
PostgreSQL 0.076 seconds
Size of Neo4j Database after Import
Nodes created Properties set
Relationships created
Relationship types
Database disk usage
15.000 119.992 14.956 1 3 MB50.000 399.992 49.841 1 10 MB
100.000 799.992 99.687 1 19 MB250.000 1.999.992 249.215 1 60 MB500.000 3.999.992 498.380 1 119 MB
1.000.000 7.999.992 996.747 1 450 MB2.000.000 15.999.992 1.993.494 1 895 MB5.000.000 39.999.992 4.983.735 1 2212 MB10.000.000 79.999.992 9.967.470 1 4457 MB
ConclusionWhy Neo4j
Scalable architecture optimized for speed ACID compliance to ensure predictability of relationship-based
queries Supported programming languages (Java, JavaScript, PHP …) Master-slave replication Foreign keys Fast Query Fast Import
Thank you