I have a database with 1 table and 4 fields. No relational link with
anything or other databases. I add about 20 records per second and
periodically query for information. My question, should I create an index
for this table? If so why? If so why? I thought a index would make sense if
it was relation one field to another.
Thanks
Ralph Krausse
www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpghi ralph,
indexes are "particularly" useful in SELECT statements.
Some examples where indexes will be useful are:
a)indexes will be useful for a query against a table in which columns
frequently involved in search conditions of a select query using WHERE
clause.
b)select statements that involves joins and grouping are frequently done
against specific columns.
c)select queries that involves, returning of distinct values from the table.
d)select queries involving order by cluases. Creation of indexes on the
columns of table that are part of "order by" clause eliminates the need for
SQL Server to sort the data because the rows are already sorted. This
improves query performance.
As you said the table inserts almost 20 records per second which , shows
high volume of data manipulation operation on the table which may get
affected if you create unncessary index on the table.
So careful while creating index on the table and give consideration to the
queries that are run against the table. Mainly SELECT,UPDATE that involves
where clauses/joins.
Vishal Parkar
vgparkar@.yahoo.co.in | vgparkar@.hotmail.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment