G
Gary Sadler
Hi,
Any help on clarifying the following would be much appreciated.
Given an unlimited number of categories with each category containing
the data {ID, NAME, DETAILS} which of the following schemas is the
best performing in terms of SQL SELECT access given that each category
contains an average of 100 records. The really important factor is the
speed of the SELECT clause - the performance of the UPDATE, INSERT,
DELETE clauses as well as storage size efficiency are not important.
**SCHEMA A**
Each category uses it's own table such that SQL access may be
"SELECT ID, NAME, DETAILS FROM Category1"
"SELECT ID, NAME, DETAILS FROM Category2"
"SELECT ID, NAME, DETAILS FROM Category3"
etc..
**SCHEMA B**
A single table is used with an additional CATEGORY field
"SELECT ID, NAME, DETAILS FROM TABLE WHERE CATEGORY = 1"
"SELECT ID, NAME, DETAILS FROM TABLE WHERE CATEGORY = 2"
"SELECT ID, NAME, DETAILS FROM TABLE WHERE CATEGORY = 3"
etc...
Regards,
Steve.
Any help on clarifying the following would be much appreciated.
Given an unlimited number of categories with each category containing
the data {ID, NAME, DETAILS} which of the following schemas is the
best performing in terms of SQL SELECT access given that each category
contains an average of 100 records. The really important factor is the
speed of the SELECT clause - the performance of the UPDATE, INSERT,
DELETE clauses as well as storage size efficiency are not important.
**SCHEMA A**
Each category uses it's own table such that SQL access may be
"SELECT ID, NAME, DETAILS FROM Category1"
"SELECT ID, NAME, DETAILS FROM Category2"
"SELECT ID, NAME, DETAILS FROM Category3"
etc..
**SCHEMA B**
A single table is used with an additional CATEGORY field
"SELECT ID, NAME, DETAILS FROM TABLE WHERE CATEGORY = 1"
"SELECT ID, NAME, DETAILS FROM TABLE WHERE CATEGORY = 2"
"SELECT ID, NAME, DETAILS FROM TABLE WHERE CATEGORY = 3"
etc...
Regards,
Steve.