Jump to content

Recommended Posts

Which do you think (or do you know) is faster

 

I am possibly taking up part of a project. It is to create a blog system for a larger website geared at having thousands of members, each with a blog among other things

 

i am thinking of having all blog entries in one table like this, in its most basic form

 

TABLE entries

FIELDS

id

title

entry_body

username

 

then we assemble each users blog from this query

 

SELECT (id, title, entry_body) FROM entries WHERE username = $username

 

or should I make a new table for each user

 

TABLE $username_entries

FIELDS

id

title

entry_body

 

SELECT * FROM $username_entries

//SELECT statements might not always use * so take that in account of your speed estimate

 

yes i know SELECT * statements are really fast, but i am thinking about the massive numbers of tables that mysql has to sift through before it even finds the correct one

 

so my question is, is it faster to have thousands (if not hundreds of thousands) of entries in one table and use a WHERE clause, or is it faster to select one table from thousands and dump its contents?

 

I just wanna know because I dont wanna necessarily clutter the database with oodles of tables unless there is a serious speed bonus

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/143155-solved-which-is-faster/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.