473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Keys in a table: Is there a point when all columns are important?


Folks,

I have a table that has five columns in it - It collates references to
records in five other tables. I understand that an index/key can help
improve performance when searching - however I also believe too many
keys can hamper performance since table updates also mean updateing the
indexes.

Thus - Since all five columns in my table can be used individually for
specific searches, would I be better off not having keys - Since the
keys/indexes would not have to be updated, I stand a performance
improvement in this situation,true?

Comments via the newsgroup are greatly appreciated, thanks,

Randell D.
Jul 20 '05 #1
2 1204
Randell D. wrote:
Thus - Since all five columns in my table can be used individually for
specific searches, would I be better off not having keys - Since the
keys/indexes would not have to be updated, I stand a performance
improvement in this situation,true?


It's often the case that an application reads the data more than it
updates data. So the cost of updating the keys will likely give you
performance benefit on read operations many times. And depending on the
size of your dataset, the difference between an indexed search and a
non-indexed search can be huge. If the keys are actually going to get
used, it's almost certainly a net benefit to keep them.

I recommend that indexes should be removed when they are on columns that
are *never* used in search criteria, sorting, or join conditions. Even
if a column is only used very seldom, keeping an index maintained can be
justified if it's important that those rare searches run as quickly as
possible.

Regards,
Bill K.
Jul 20 '05 #2
Bill Karwin wrote:
Randell D. wrote:
Thus - Since all five columns in my table can be used individually for
specific searches, would I be better off not having keys - Since the
keys/indexes would not have to be updated, I stand a performance
improvement in this situation,true?

It's often the case that an application reads the data more than it
updates data. So the cost of updating the keys will likely give you
performance benefit on read operations many times. And depending on the
size of your dataset, the difference between an indexed search and a
non-indexed search can be huge. If the keys are actually going to get
used, it's almost certainly a net benefit to keep them.

I recommend that indexes should be removed when they are on columns that
are *never* used in search criteria, sorting, or join conditions. Even
if a column is only used very seldom, keeping an index maintained can be
justified if it's important that those rare searches run as quickly as
possible.

Regards,
Bill K.


Thanks for that...
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
4
by: Robin Tucker | last post by:
Hi, I'm trying to determine with my program whether or not a given database supports a given feature set. To do this I'm querying for certain stored procedures in the sysobjects table and if...
3
by: Gaz | last post by:
I have a table which has 10 columns which make up the secondary key. 1 or more of these columns can be set but the remaining columns in the secondary key will be null. For example : id k1 k2...
3
by: Randell D. | last post by:
Folks, My internet access is intermitent until I get my own connection inside the next ten days - I say this so that I can thank in advance who ever gives a few seconds to read/answer my...
3
by: heroe | last post by:
Hello *, i write you with an urgent problem. I would like to create forign keys to datetime field, but it doesn't seem to work. I get Can't create table '.\sampleDB\student_module.frm' (errno:...
5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
9
by: PeteCresswell | last post by:
I've got something called "Reference Rates". The idea is that on a given day, we have various rates of return for various entities. e.g. Libor 3-month return, Libor 6-month return, US Treasury...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.