Time-out occurred while waiting for
buffer latch type 2 for page
(1:1535865), database ID 6.
This is an error message I got for five times while trying to create an index
CREATE NONCLUSTERED INDEX YearIndx ON dbo.Papers
(
PublicationYear
)
The papers table is about 20,000,000 records and 175 GB
I’ve never had this happen to me and searches on the great Google didn’t hit me immediately, so here is what I would try:
Please verify that you are running this query from an SSMS query window. If so, then go to Query, Query Options, Execution. What is the value for Execution time-out?
oh, and make sure that you read up on the create index statement to make sure that the options I chose apply to your situation. for instance, if tempdb is on the same set of disks as db_name(6) is, then the situation will probably only get worse
another option is to create an identical, empty table which has all of the indexes you want on it. then you can gently fill that table by selecting out of dbo.Papers. When you are finished, then with one batch, transaction wrapped, rename dbo.Papers to dbo.Papers_old and dbo.Papers_new to dbo.Papers.
finally, I was thinking about your index. Are you absolutely certain that an index on just PublicationYear will solve whatever problem appearing? Just struck me that most folks probably are not searching for all of anything written in one year. More likely, all papers written by john in this year, or all papers written last month.