mongodb와 mysql의 CRUD 연산의 성능 비교

69
MongoDB 와 MySQL 와 CRUD 와와와 와와 와와 최최최 http://blog.wychoe.net

description

 

Transcript of mongodb와 mysql의 CRUD 연산의 성능 비교

  • 1. MongoDB MySQL CRUD

    http://blog.wychoe.net

2.
.

Facebook 5
Google 500 PB/Month
Flicker 500 Geotag/Month
3. Scalability
4. Scale Up
MySQL CPU Scale up
16
CPU Core 16
5. RDBMS (1)


6. RDBMS (2)
Replication

Master-Slave
Write(n), Read(1)
Partitioning(Sharding)

Join
7. NoSQL
Lightweight RDBMS, `98, Carlo Strozzi
SQL DBMS
Eric Evans `09
ACID ,
RDBMS Join
8. NoSQL
FaceBook, Twitter, Digg.com
Cassandra
Google
Big Table
Yahoo
Hadoop
Amazon
Dynamo
9. RDBMS vsNoSQL
RDBMS
ACID
Scalability
Scalability
NoSQL
Scalability
Not Only SQL
10. CAP (1)
Consistency
.
Availability
.
Partition Tolerance
.
DBMS .
Consistency:
ACIDTransaction
Availability
Partition Tolerance:
Scale out
11. CAP (2)
12. MongoDB
C-P
Document-Oriented storage

&
Auto-Sharding

Map/Reduce
13.


SNS, SNG NoSQL
DBMS ?
RDBMS NoSQL ?
14.
RDBMS NoSQLCRUD
RDBMS NoSQL .
CRUD

15.
RDBMS
MySQL
NoSQL
MongoDB
16.
CRUD
2
MongoDB ,
17.
~5/18

~5/25
,
~6/1
MySQL CRUD
~6/8
MongoDB CRUD

18. ~5/25


19. (1)
VMWare DBMS

Windows XP SP3
Intel Core2 Dual 2.5Ghz
2GB Ram

Windows XP SP3
512 MB Ram
Single Core
12 GB HDD
20. (2)

VM-MySQL
MySQL 5.5.12 x 1
VM-MongoDB Single Node
MongoDB 1.8.1 x 1
VM-MongoDB Multi Node
MongoDB 1.8.1 x 3
Config Server x 1
Router x 1
21. (3)
22. (4)
23. (5)
24. (1)


http://www.data.gov/tools/123
: 494,401
: 93
: INT, DATE, TEXT
25. (2)
26. (3)

: 494,401
: 93 -> 50
Unique RecordNum
27.
MySQL, CRUD

,
28. ~6/1
MySQL CRUD
29.
42

RecordNum
1 ~ 42
RecordNum
RecordNum
30. Insert
No Index
.
Index
n^2 .
31. Insert (no index)
1000
0.009 ( 0.001 0.267)

32. Insert (index)
1000
0.007 ( 0.002 0.302)

33. Insert
No index Index (0.001)
Index .
No Index .
.
34. Select
No Index
.
Index
No Index .
35. Select (no index)
100
15.232 ( 14.798 15.992)

36. Select (index)
100
0.058 ( 0.029 0.095)

37. Select
Index No Index (14)
38. Update
Select .
No Index
.
Index
No Index .
39. Update (no index)
100
46.336 ( 38.873 60.660)
Failed (timeout)

40. Update (index)
100
0.017 ( 0.002 0.072)

41. Update
Index No Index (60)
Select

Failed Lock
42. Delete
No Index

Index
No Index .
43. Delete (no index)
20
5 Failed
Console
23.631, 12.86 52.83

44. Delete (index)
20
0.058 ( 0.012 0.028)

45. Delete
Index No Index (22)

Lock .
46.
MongoDB, CRUD



47. Insert
Single Node
.
MySQL .
Multi Node
.
Single Node
48. Insert (Single Node)
1000
0.002 ( 0.0002 0.087)
MySQL 0.005

49. Insert (Multi Node)
1000
0.001 ( 0.0002 0.099)
Shard Key .
Insert .

50. Insert
MongoDB Insert MySQL .
Single Node Multi Node ( 0.001)
MySQL ACID .
Multi Node . .
51. Select
Single Node
.
MySQL .
Multi Node
Single Node .
52. Select (Single Node)
100
0.0002 ( 0.0000 0.004)

53. Select (Multi Node)
100
0.0001 ( 0.0000 0.004)

54. Select
MongoDB MySQL ( 0.057)
Document .
Single, Multi .
55. Update
Select .
Single Node
.
Multi Node
Single Node .
56. Update (Single Node)
100
0.004 ( 0.0000 0.084)

57. Update (Multi Node)
100
0.003 ( 0.0000 0.068)

58. Update
MongoDB MySQL (0.014)
Multi Single (0.001)
59. Delete
Single Node

Multi Node
Single Node .
60. Delete (Single Node)
20
0.00008, 0.000 0.00009
61. Delete (index)
20
0.0002 ( 0.000 0.0002)
62. Delete
MongoDB MySQL (0.057)
Single Node Multi Node .
63. (1)
MongoDB MySQL Insert .
64. (2)
MongoDB MySQL Select .
65. (3)
Update .
MongoDB .
66. (4)
Delete MongoDB Single , MySQL .
67. (5)
MySQL MongoDB .
ACID MySQL .
Single Node Multi Node , Delete Multi Node .
MySQL ODBC, MongoDB C# Driver . .
68. (6)
MongoDB Multi Node Insert .
MongoDB .
, ODBC MongoDB .
DBMS , RDBMS MongoDB .
69.
Q&A
http://www.mongodb.org/