Help me to create a database with more performance

Hi,

(Sorry for English, because it isn’t my vernacular!)
I’m new to MySQL Performance, because, I cannot find a good mysql database tutorial.

I’m programming an Weblog system, like Blogger, free to register and use for everybody.
But, I haven’t enough knowledge about Database performances.

Can you write some query for me to create best tables, search and add new record, delete for have the best performance?!

I should say that I want these tables:

  1. users: ID, Usernames, Passwords, emails and some others *** queries for add new user, delete, search for password for login or email by username.

  2. posts: id, post id(separable for each weblog), title, post contest *** queries for add new post, delete post, select post, search in post contents and titles.

  3. Comments: title, comment content, id(separate for each post) *** queries for add new comment, delete comment and select comments

Can you tell me what’s the best query?!
It’s urgent for me.

And… Can you tell me name of some best books for database and mysql performance?! (for begginers to professional users)

Note that I may have more than 1 million users(weblogs) and millions of posts!

Thanks.

Sorry for posting a “me, too”.

I have a similar problem and I even did find a book on the subject: “Building Scalable Web Sites” by Cal Henderson. But information on how to do it “hands-on” is not really provided.

I asked a “what to do with millions of users and millions of postings”, too. But for now I did not really get an answer. Some people (on other forums) advise me to scale horizontally (multiple tables), other people tell me to put 25 Terrabyte into one big table.

Any other opinions? :wink:

Tobias