Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A couple things come to mind. </p> <ol> <li><p>Do you need to keep that much data? If not, consider either creating an archive table if you want to keep it (but don't create it just to join it with the primary table every time you run a query).</p></li> <li><p>I would avoid using a temp table with so much data. See this article on temp table performance and how to avoid using them.</p></li> </ol> <p><a href="http://www.sql-server-performance.com/articles/per/derived_temp_tables_p1.aspx" rel="nofollow noreferrer">http://www.sql-server-performance.com/articles/per/derived_temp_tables_p1.aspx</a></p> <ol start="3"> <li>It looks like you are missing an index on the server_id field. I would consider creating a covered index using this field and others. Here is an article on that as well.</li> </ol> <p><a href="http://www.sql-server-performance.com/tips/covering_indexes_p1.aspx" rel="nofollow noreferrer">http://www.sql-server-performance.com/tips/covering_indexes_p1.aspx</a></p> <p><strong>Edit</strong></p> <ol start="4"> <li>With that many rows in the table over such a short time frame, I would also check the indexes for fragmentation which may be a cause for slowness. In SQL Server 2000 you can use the <code>DBCC SHOWCONTIG</code> command.</li> </ol> <p>See this link for info <a href="http://technet.microsoft.com/en-us/library/cc966523.aspx" rel="nofollow noreferrer">http://technet.microsoft.com/en-us/library/cc966523.aspx</a></p> <p>Also, please note that I have numbered these items as 1,2,3,4 however the editor is automatically resetting them</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

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