各位大大,小的目前有个一个项目,要设计一个数据库系统来管理约20TB的数据,大约有600亿条记录。主要是维护传感器读上来的数据,表结构很简单,大致是<时间戳,reader_id, sensor_id, msg>这样。每天大概要存储2亿条数据,一年有800亿条数据。对这些数据,还要支持基于时间、reader_id和sensor_id的实时查询操作。由于成本考虑,基本上不会用Oracle之类了,而HBase等分布式数据库又不熟悉,因此打算用MySQL来做。大家有什么建议么?MySQL是否能胜任这样规模的数据的管理?如果可以,接下来我还想问关于1. MySQL系统多节点架构部署;
2. 长表格sharding/分片;
3. 单表最大支持条目数的问题。非常感谢!

解决方案 »

  1.   


    大大是否可以在扩展说一下?
    另外我打算用普通的pc server来做,是否能满足要求?      
      

  2.   

    13.5. The MyISAM Storage Engine
    MyISAM is the default storage engine. It is based on the older ISAM code but has many useful extensions. (Note that MySQL 5.4 does not support ISAM.) Table 13.2. MyISAM Storage Engine FeaturesStorage limits 256TB Transactions No Locking granularity Table 
    MVCC No Geospatial datatype support Yes Geospatial indexing support Yes 
    B-tree indexes Yes Hash indexes No Full-text search indexes Yes 
    Clustered indexes No Data caches No Index caches Yes 
    Compressed data Yes[a] Encrypted data[b] Yes Cluster database support No 
    Replication support[c] Yes Foreign key support No Backup / point-in-time recovery[d] Yes 
    Query cache support Yes Update statistics for data dictionary Yes     
      

  3.   

    PC SERVER没有问题,你可以直接使用HP 的PROLIANT G385之类的来做。不过注意存储系统的设计,估计要用到SAN了。
      

  4.   

    mysql> select 200000000/3600/24;
    +-------------------+
    | 200000000/3600/24 |
    +-------------------+
    |     2314.81481481 |
    +-------------------+
    1 row in set (0.00 sec)1秒2300条,整个好点的服务器,另外在插入的时候,用insert into tbname values(1),(2),(3)这样的方式批量写入,效果会好很多,比如10W条写一次库。
      

  5.   

    不需要联合查询应该用key_value型数据库
      

  6.   

    你的情况,MySQL不是不可以,维护相对会复杂,数据库环境的架构要仔细考虑。
    如果没有事务,修改等的操作,只是入库操作,还是使用HBase这种分布式存储方案合适,后期如果再次做数据处理及数据分析,可以很容易与Hadoop分布式计算平台兼容。