This topic is locked

better performance?

6/21/2012 2:49:49 PM
PHPRunner General questions
S
stiven author

Hello everyone,
I have a quick question i have a table with these fields: Education, Hispanic, Occupation, Industry. All these fields are going to be lookup values from a table in the database, my question is what method would be better. is it better to have a separate lookup table for each field or to have just one table for all the fields? i.e. one table to lookup education, one table to lookup hispanic.. etc.. or just one table with all 4 fields.?
Thanks for your input.

Sergey Kornilov admin 6/21/2012

Performance wise - it doesn't matter. One table will work the same way as four tables. Just make sure you add required indexes if lookup tables are going to be large.
From database design point of view - you better off having a separate table for each lookup. Each lookup table needs to have two fields (link field and display field). This way your data won't be broken if you need to make changes to one of records in lookup table.

S
stiven author 6/21/2012

Thanks for your prompt response, it was a great help.