开发者

Mysql Query vs XML Data in php

开发者 https://www.devze.com 2023-02-17 19:26 出处:网络
We are building a website which would serve about 30k unique visitors a day. Curr开发者_如何学Cently we use a simple mysql Connect > A Simple Query > mysql Close.

We are building a website which would serve about 30k unique visitors a day. Curr开发者_如何学Cently we use a simple mysql Connect > A Simple Query > mysql Close.

I'm afraid that with a dual core server running 2GB of RAM we would be able to open about 1k mysql connection tops. is 1k a good estimate?

Is it better to make a Cron-Job output XML files and let our php files grab the data from them?


Typically XML will never be faster than MySQL for searching data (i.e. performing queries).

I don't know what kind of data you have, but XML will only be faster if you have a bunch of simple files and don't need to search, just load the files and format them.

If you need to search, then use MySQL. MySQL does all sorts of optimizations. For example it stores KEY columns in a separate file, allowing for a much faster search.


I would suggest using Zend cache for caching MySQL query results for the the data that doesn't change frequently.

0

精彩评论

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