| |
 |
|
SQL Server
Tips by Burleson |
Avoid Headaches with
Preventive Maintenance
I would like to suggest that it would be a good idea to set up
regular maintenance policies on legacy systems. After all, you
schedule regular maintenance for your automobile. Vendors release
new versions of your packaged software. But most companies use the,
"If it's not broken, don't fix it!" policy instead.
I appreciate the fact that programmers have to develop new software,
and have to try to keep the existing systems up and running by
making repairs to the code that's known to be broken.
But how much trouble would be avoided if someone went to the
database, looked at trends, and increased or changed things before
they broke?
Preventive maintenance could be done to the to the database as well
as to the source code. For example, imagine that every month the
average length of a VARCHAR(n) column in a table is getting longer.
Why not make the column's upper bound greater with an ALTER TABLE
now to avoid future problems? On the other hand, could performance
be improved by altering a column to a smaller sized datatype, say
INTEGER to SMALLINT?
This is a book excerpt from:
Advanced SQL Database Programmer Handbook
Donald K. Burleson, Joe Celko, John Paul Cook, Peter Gulutzan
ISBN: 0-9744355-2-X
http://www.rampant-books.com/ebook_dbazine_SQL_prog.htm
|