Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>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:</p> <p>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?</p> <pre><code>CREATE NONCLUSTERED INDEX YearIndx ON dbo.Papers ( PublicationYear ) WITH ( SORT_IN_TEMPDB = ON --, ONLINE=ON --Enterprise only , ALLOW_ROW_LOCKS = OFF --default is on , ALLOW_PAGE_LOCKS = OFF --default is on , MAXDOP = 1 --all that you can allow ) </code></pre> <ul> <li><p>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</p></li> <li><p>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.</p></li> <li><p>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.</p></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload