0

We are building a website which would serve about 30k unique visitors a day. Currently 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?

3
  • 2
    i would consider db+file cache Commented Mar 16, 2011 at 20:27
  • Can you elaborate on the file cache, i'm coming from a programming environment and have little clue about how to set up such a thing Commented Mar 16, 2011 at 20:29
  • one suggestion below, there's a few other about, just google php cache Commented Mar 16, 2011 at 20:37

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

no need for search. the XML file would be exactly what i need, simple xml loading & listing results using a For Each loop
Then using XML files may be faster. No guarantees though, remember MySQL also does caching -- You can write a script/daemon to cache stuff, but then you might be better off with MySQL And MEMORY tables .... As a sidenote, if you only have "flat" data and no need for XML's nesting features, you'll be better of with CSV IMHO. PHP provides fgetcsv() and fputscsv().
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.