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!

DBREINDEX problems

Status
Not open for further replies.

petertickler

Programmer
Oct 1, 2002
67
GB
I have a Diary table structure like this.

[Diary_ID] [int] IDENTITY (1, 1) NOT NULL ,
[Address_ID] [int] NOT NULL ,
[Date] [datetime] NULL ,
[UserName] [varchar] (20) NULL ,
[ContactName] [varchar] (40) NULL ,
[ContactType] [varchar] (20) NULL ,
[Notes] [text] NULL ,
[CreationDate] [datetime] NULL ,
[DeletionDate] [datetime] NULL ,
[ResponseDate] [datetime] NULL ,
[ClosureDate] [datetime] NULL ,
[ReferredTo] [varchar] (30) NULL ,
[Status] [char] (1) NULL ,
[FollowupDate] [datetime] NULL

When I first went Live with it, I regularly had trouble with it suddenly refusing to be updated by my applications. They would hang until I reindexed the table.

I got round this by setting up a job to do a reindex every three hours.

USE ContactsLive
Go
DBCC DBREINDEX (Diary)
Go

This has worked fine for a year, but now that I have added one more field to the structure ([LinkedFile] [varchar] (300) NULL), suddenly I have got the same old problem again. I have amended my ReIndex job to running every hour, but still the problem recurs almost daily.

Can anyone suggest what things I might look into fix this problem?
 
I will do next time I have the problem.

This is the only table I ever have this problem with. My assumption was that it was something to with the fact that it is handling a Text field. I see now that in SQL Server 7.0 I can have a Varchar or Char field up to 8000 bytes long. In view of the fact that the longest piece of data in the Notes field is just under 3000 characters, I wonder if it wouldn't be a good idea to change back to either a Char or VarChar.

What do you think?

Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top