Jump to content

[SOLVED] Which is faster


Lodius2000

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.