TPC-H in MongoDB
Upcoming SlideShare
Loading in...5
×
 

TPC-H in MongoDB

on

  • 1,287 views

Run TPC-H queries in MongoDB and benchmark against MySQL RDBMS

Run TPC-H queries in MongoDB and benchmark against MySQL RDBMS

Statistics

Views

Total Views
1,287
Views on SlideShare
1,287
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

TPC-H in MongoDB TPC-H in MongoDB Presentation Transcript

  • TPC-H inMongoDBAung Thu Rha Hein(g5536871)
  • Agenda• Introduction to MongoDB• TPC-H Data Setup• Schema• Advantages and Disadvantages of New Schema• Queries o Pricing Summary Record o National Market Share Query o Total Supplier Query o Potential Part Promotion Query o Suppliers who kept orders waiting query o Global Sales Opportunity Query• Benchmark result• Discussion• Demonstration
  • Introduction to MongoDB• Open source, document-oriented and schema-free• Store data in BSON format• Easy to understand• Flexible, Scalable & lightweight• Ease of use• No ‘join’ operation• SQL to MongoDB Sample Query• Select * from users where status = “A” ORDER BY USER_ID DESC• db.users.find( { status: "A" } ).sort( { user_id: -1 } )
  • TPC-H Data Setup• Import data into MongoDB o Use MongoVue to import from MySQL o Time consuming and difficult• To achieve flexibility: o Embedded all tables into single collection o Replace all foreign keys with objects from lineitem table o Choose lineitem table because of • No primary keys
  • Schema • Final Schema of TPC-H in MongoDBlineitemOrder CustomerNation Region Partsupp Part supplier N R
  • Advantages and Disadvantages of New Schema• Advantages o Easier to understand than SQL schema o One document: one record o No need to join tables• Disadvantages o Higher memory usage o Update operation becomes more demanding o Converting to BSON takes time o Require lot of computational power o Only around 300,000(5%) count of lineitem able to convert
  • Queries• Select 6 queries to run on MongoDB with Map- Reduce & Aggregation Framework• Compare the result with MySQLPROBLEMS• Outputs are not the same because of failure during converting data• Aggregation framework is still in development
  • Q1: Pricing Summary Record Query
  • Q8:National Market ShareQuery
  • Q15:Top Supplier Query
  • Q20:Potential part Promotion Query
  • Q21:Supplier who kept orderwaiting
  • Q22:Global Sales Opportunity
  • Benchmark result• All benchmarks run on Intel Core i7-3610QM 2.30GHz 6MB cache,4GB DDR3,750GB 7200 RPM,Win64 system• Query1 MongoDB 6.1 sec MySQL 0.2 sec• Query 8 MongoDB 1.6 sec MySQL 0.1 sec• Query15 MongoDB 0.7 sec MySQL 0.4 sec
  • Benchmark result(cont.)• Query 20 MongoDB 1.1 sec MySQL 174.4 sec• Query 21 MongoDB 6.2 sec MySQL 5.5 sec• Query 22 MongoDB 7.6 sec MySQL 0.8 sec
  • Discussion & Conclusion• MongoDB left behind in all queries o Design problem o Aggregation framework problem o No standard Query Language o Server side query processing is not the nature of NoSQL o Complex SQL cannot convert easily• Only suitable for Applications: o Business card database o Web Blog o Applications without complex transactions
  • Demonstration