Jump to content

Whats the optimum way to set up these tables.


poleposters

Recommended Posts

Hi,

 

At the moment I have around five tables that are normalised.

 

I have one particular query which is used repeatedly on my site,hundreds of times more often than any other query, which involves joining the 5 tables and extracting data from one column in each table.

 

Would it be better to have the data required for this query duplicated in another table to save resources?

 

Or should I leave it as is?

Link to comment
Share on other sites

in my opinion just leave it, the reason you normalise tables is to save duplication of information and therefore disk space

 

queries run very fast and the fact that you pull information from all five tables in one query should not make you think of duplicating information, there comes a time when you want to remove all the duplicate information and finding it may be difficult

 

as I said in my humble, lack of proper, experience :)

Link to comment
Share on other sites

Hi,

 

At the moment I have around five tables that are normalised.

 

I have one particular query which is used repeatedly on my site,hundreds of times more often than any other query, which involves joining the 5 tables and extracting data from one column in each table.

 

Would it be better to have the data required for this query duplicated in another table to save resources?

 

Or should I leave it as is?

That depends on the nature of the table, the column you're extracting, and how the query performs... post the EXPLAIN.

Link to comment
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.