Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for unused fields.

Status
Not open for further replies.

KarveR

MIS
Dec 14, 1999
2,065
GB
I have a 6+ years old db, and over time evolution has taken its toll, how can I find out now if I have any unused fields.

(we do trim the DB weekly, but with 3mil+ records and 33 fields, I could use some way of quick checking.

I can eliminate a few but am left with I guess about 12 fields (none indexed), with a multitude of apps (web, perl, remote server etc) I cant check all of the source code.

After this I need to check the archive DB, ... deep joy.

Any help welcomed, Thanks

K.


______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
What do you mean by unused? All the values in those fields are NULL?

“I sense many useless updates in you... Useless updates lead to defragmentation... Defragmentation leads to downtime...Downtime leads to suffering..Defragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
 
You could keep a query log for a while, then search the log for the fields you suspect are not being used. However, "not being used" is a vague term; does it mean "not used in the past 12 months", or what?

If you do identify some fields as "not being used", you could then rename them for a period before daring to delete them, in case of complaints from irate users.
 
the fields should be null, yes.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
So check which of these 12 fields have values that are not null and assume that those are used, leaving the other fields being unused



“I sense many useless updates in you... Useless updates lead to defragmentation... Defragmentation leads to downtime...Downtime leads to suffering..Defragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top