MySQL データ分割入門

  • 3,296 views
Uploaded on

 

More in: Lifestyle
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
3,296
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
11
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. MySQL mysql-casual#1 (2010-12-10) @xaicron2010 12 13
  • 2. • @xaicron ( ) • works at DeNA • blog http://blog.livedoor.jp/xaicron/2010 12 13
  • 3. Perl2010 12 13
  • 4. JPerl Advent Calender2010 12 13
  • 5. 2010 12 13
  • 6. http://perl-users.jp/articles/advent-calendar/help.html2010 12 13
  • 7. 2010 12 13
  • 8. MySQL2010 12 13
  • 9. 2010 12 13
  • 10. 2010 12 13
  • 11. 2010 12 13
  • 12. 2010 12 13
  • 13. myfinder2010 12 13
  • 14. 2010 12 13
  • 15. cv.2010 12 13
  • 16. Agenda • Sharding • Partitioning2010 12 13
  • 17. Sharding2010 12 13
  • 18. Sharding • Shared Nothing • DB2010 12 13
  • 19. user_id2010 12 13
  • 20. 2010 12 13
  • 21. Sharding2010 12 13
  • 22. DB2010 12 13
  • 23. • • Disk IO •2010 12 13
  • 24. Sharding2010 12 13
  • 25. • JOIN • • • orz2010 12 13
  • 26. 2010 12 13
  • 27. user_id auto_increment DB2010 12 13
  • 28. DB2010 12 13
  • 29. 2010 12 13
  • 30. • • • •2010 12 13
  • 31. Partitioning2010 12 13
  • 32. Partitioning • • SELECT Partition drop • 5.1 --with-partition2010 12 13
  • 33. 2010 12 13
  • 34. 2010 12 13
  • 35. Partitioning2010 12 13
  • 36. • • Partition • Partition SELECT • SUM() COUNT() •2010 12 13
  • 37. 2010 12 13
  • 38. ALTER TABLE table_name DROP PARTITIONS!!2010 12 13
  • 39. Partition2010 12 13
  • 40. 2010 12 13
  • 41. 2010 12 13
  • 42. SELECT Partition2010 12 13
  • 43. CREATE TABLE `tweet` ( `id` bigint(20) NOT NULL, `tweet` varchar(140) NOT NULL, `created_on` timestamp NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 PARTITION BY RANGE ( UNIX_TIMESTAMP(created_on) ) ( PARTITION p20101210 VALUE LESS THAN (1291906800), PARTITION p20101211 VALUE LESS THAN (1291993200), PARTITION p20101212 VALUE LESS THAN (1292079600), PARTITION p20101213 VALUE LESS THAN (1292166000), PARTITION p20101214 VALUE LESS THAN (1292252400)2010 12 13
  • 44. 201012102010 12 13
  • 45. SELECT * FROM tweet WHERE created_on > ‘20101210’ AND tweet = ‘mysqlcasual’;2010 12 13
  • 46. p20101210 partition2010 12 13
  • 47. EXPLAIN PARTITION SELECT ... partition2010 12 13
  • 48. Partitioning2010 12 13
  • 49. • PARTITION created_on) KEY ( Primary Key • UNIQ • SELECT • UNIX_TIMESTAMP() v5.1.43 !!2010 12 13
  • 50. 2010 12 13
  • 51. • • MySQL • ( cron ) • !!2010 12 13
  • 52. cv.2010 12 13
  • 53. Sharding Partitioning2010 12 13
  • 54. 2010 12 13
  • 55. 2010 12 13
  • 56. 2010 12 13
  • 57. 2010 12 13