开发者

How do I set up slave MySQL database for reporting purposes only?

Given a large MySQL production database, optimized for fast inserts, how would I go about setting up a "slave" database that would be optimized for fast searches? In my head, the slave would basically be a replica of the main, but with significantly more indices across the whole database to speed up read access. Is this sort of customized master-to-slave replication possible?开发者_如何学Python


Setting up master/slave replication?

This How to Set Up Replication in MySQL guide has both what you need to do on the master and the slave.

Found here on this MySQL Replication question:


I'd argue that you may want to consider an alternative database for your reporting side. You mentioned the need for heavy indexes -- why? Since I assume you're doing bulk loads of data and hardly modifying the data at all (ie: transactions), then you should consider a columnar database. If you're used to mysql syntax, then there are two column-oriented databases which use mysql as a front end. Thus, your queries will stay the same, but how the data is stored underneath will be completely different.

It really throws your question out and adds a new one in: what's the best way to move my data to allow it to be optimized for many reads and few writes.

Full Disclosure: I work as the open-source guy for Infobright (one of the column oriented techs). Your question is one I see a lot of, so I thought I'd give you my thoughts. However, there are several different columnar vendors; it all depends on volume, money, and time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜