Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL Server 2008 Table Partitioning
    text
    copied!<p>I have a huge database that has several tables that hold several million records. It's holding engineering data for a client and continually grows. This is impacting performance, even with optimised indexing. So I've been looking at partitioning.</p> <p>However, I would be looking at partitioning on a version held in a table. In it's most simplistic form the table comprises of:-</p> <p><code> VersionID int <br> SheetID int <br> CreationDate datetime <br> SomeDate nvarchar(255) <br> Version int </code></p> <p>And the data would look something like:-</p> <p><code> 1, 1, 2010-09-01, blah, 1 <br> 2, 1, 2010-09-02, more blah, 2 <br> 3, 1, 2010-09-04, blah, 3 <br> 4, 2, 2010-09-02, more blah, 1 <br> </code></p> <p>For every new change to a 'sheet' in the system, this table has a new entry added with a new version. Ideally I want to partition the table so that I have the top 2 versions for each 'sheet'. So from the table above I'd want versions 2 &amp; 3 for sheet id 2, and version 1 for sheet id 2, with the rest moved to the partition. From what I've read this doesn't seem possible. Am I right or wrong?</p> <p>If I'm wrong, then following on from this I have a bunch of tables that all link back to this table. These hold the various versions of data entered. Can I partition these based on the partition of the 'main' table, or does the partition have to be specifically based on a column from the table it refers to?</p> <p>NB I'm not the most au fait SQL developer, so apologies if this is a completely daft question!</p>
 

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