Jump to content

[SOLVED] which way would load faster?


acidglitter

Recommended Posts

on one of my sites i have two members tables. most of the fields in both of them are varchar and int with a couple date fields. the first table is used a lot more frequently than the second table. what would be the easiest on the server and load the fastest? to keep them both separate, or to combine everything into one table? (i think there would be 16 fields total if i put them together)

Link to comment
https://forums.phpfreaks.com/topic/117966-solved-which-way-would-load-faster/
Share on other sites

A table should be defined as a place holder for rows of data that contain data of the same type but of different value (such as user's accounts)

 

If you have different account types you can account for this with a single enum or integer.

 

If those account types require different fields you can account for it by using additional separate tables.

 

 

1 table probably work better because then you can index the fields once instead of twice.

no what I am saying is what a table in general should be

 

if you have a very clear and evident 2 different user account types then by all means seperate them.

 

But if you can not find a clear reason to put a user in 1 table and not in another than they should be in 1 table.

 

You can always UNION the tables but i see that as sloppy writing.  1 table is always good keep all your foreign keys from 1 source.

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.