开发者

Using one mysql database or few. What's suits for me?

开发者 https://www.devze.com 2023-01-15 08:14 出处:网络
I\'m looking for guidance. Here is what I\'m doing. I\'m creating an advertising/publishing script using PHP and MySQL. At this time, the current program contains 41 million rows (7.5GB).

I'm looking for guidance. Here is what I'm doing.

I'm creating an advertising/publishing script using PHP and MySQL. At this time, the current program contains 41 million rows (7.5GB).

I'm thinking about storing real-time statistics and other data (users, ads, places, daily/monthly stats) on two mysql databases. And then update data (from real-time db to the 2nd db which shows users their statistics) using a cron thrice a day.

So, wi开发者_StackOverflow中文版ll this be an 'UP' or a 'DOWN' (Good or Bad)?

Thanks, pnm123


I'd probably run a master-slave, and then use the slave as a source for creating the second database you talk about. That should allow you to aggregate results, etc without impacting your main application.

0

精彩评论

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