dpo69086 2012-07-21 05:51
浏览 140
已采纳

在mysql中使用ENGINE作为MRG_MYISAM是否有任何优势

I am doing a tracking site like google adwords. I am doing only modifications. In that site i have seen they are creating tables for each month and merging that table into one this is done for the tables which stores information about clicks and search details and the merged tables having crores of records.And for querying they have used only the merged table which is having crores of records. Is there any advantage of using tables like this?And the query is taking more than 10 minutes to execute.

  • 写回答

2条回答 默认 最新

  • 普通网友 2012-07-21 06:16
    关注

    A MRG_MYISAM only works over MyISAM tables, which are, by themselves, not the first option for a table. You would normally go for InnoDB tables.

    The MRG_MYISAM engine was invented before MySQL had support for views and for partitions. Range partitioning (e.g. partition per month) is most probably what you want.

    Partitioning is transparent to the user in terms of queries, but nevertheless uses pruning so as to only read from selected partitions for a query, thus optimizing it.

    I would recomment that you use InnoDB tables, and check out range partitioning. MRG_MYISAM and MyISAM are still in use. They could work out for you. It's just that MyISAM introduces so much trouble (no crash recovery, table level locking, more...) that it's many times out of the question.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样