Q
Problem solve Get help with specific problems with your technologies, process and projects.

One table or two tables with a join?

I have 117 columns in a table, with a total column length of 1290. All of my queries against this table (4) work...

extremely fast because there are no joins.

However, 69 of the fields are tinyint fields that are only used (in the where clause) by one of the queries about 25% of the time.

Question: Should I move the 69 fields to another table and do a query with a join (just for that query)... or since it is only 69 tinyint, does it really make a difference? Having it in one table is easier.

I'm just afraid of the total length of the columns (1290) and total fields (117) in this table and how it might get slow later if everything is in one table... and I could move the 69 to another table.

Design decisions like this drive me crazy, because I consider myself a 'programmer' not a designer.


You'll be fine as long as you don't have more than a few million rows.

If any of your queries search on a column, i.e. use a column in a WHERE clause, then you should consider an index on that column.

For More Information


This was last published in September 2003

Dig Deeper on Oracle and SQL

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close