Home » Performance » MySQL » which is fastest: a join or one big table?
which is fastest: a join or one big table? [message #1284] Mon, 21 May 2007 22:43 Go to previous message
bluem  is currently offline bluem
Messages: 15
Registered: November 2006
Junior Member
I seem to be facing two possible scenarios. Which of these would offer the fastest SELECT?

Option 1) A master table that references 3 other tables via IDs. The nature of the SELECT will require that *every* row of the master table will be joined with a row from one or all of the 3 other tables. Any column in any affected table could be selectable, sortable or "countable" -- and so could benefit from an index; but will all the -joined- table indexes be usable?

Option 2) All data is in one big table already, with indexes on any selectable column, so virtually any query would be directly indexed; no joins are made. The number of columns has been multiplied greatly (and with much empty data) because I have essentially already joined everything myself and inserted the data into a big, fully indexed table. I wonder if this is better because MySQL need not create a temporary (joined) table.

Any advice is appreciated.

Read Message
Read Message
Read Message
Read Message
Previous Topic:Index Question
Next Topic:MySQL Optimal Settings
Goto Forum:

  


Current Time: Fri Jul 10 03:53:12 EDT 2009

Total time taken to generate the page: 0.02138 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.