Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Automate Sliding Window Partition Management: Part I


Automate Sliding Window Partition Management: Part I

Author
Message
Hugh Scott
Hugh Scott
SSC-Addicted
SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)

Group: General Forum Members
Points: 466 Visits: 190
Comments posted to this topic are about the item Automate Sliding Window Partition Management: Part I



johan.klovstedt
johan.klovstedt
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 20
How about the case when new data starts to fill your topmost partition? How do you avoid unnecessary data movement?

When I implemented partitioning I had 2 topmost partitions and a SQL Agent Job running a SSIS package to react on the fullness of the second topmost partition. If it were getting full then we split the topmost partition. Only to avoid any kind of data movement.


/Johan Klövstedt
Hugh Scott
Hugh Scott
SSC-Addicted
SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)SSC-Addicted (466 reputation)

Group: General Forum Members
Points: 466 Visits: 190
This article is actually in three parts. The next two parts describe automation of partition maintenance (adding partitions at the "top" and removing partitions from the "bottom").

My understanding is that they will be published next week and the week after.

Regards,

Hugh Scott



bpportman 52825
bpportman 52825
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 384
Awesome. This is really timely. I just got Enterprise approved so I can implement partitioning and this series is going to be a huge help. Is the Powershell script coming in one of the next articles. I didn't see it with this article.
alen teplitsky
alen teplitsky
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1595 Visits: 4621
can you partition a table where you keep say 30-45 days of data. have it partition by day or week to make deletes and inserts faster?
Victor Alcazar-Vihho...
Victor Alcazar-Vihho Technology
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 114
Excellent overview of Partitioning and Sliding-Window by Kimberly Tripp that provides background into why, how and technical implementation details.


http://msdn.microsoft.com/en-us/library/ms345146(SQL.90).aspx

peter-757102
peter-757102
SSC-Addicted
SSC-Addicted (453 reputation)SSC-Addicted (453 reputation)SSC-Addicted (453 reputation)SSC-Addicted (453 reputation)SSC-Addicted (453 reputation)SSC-Addicted (453 reputation)SSC-Addicted (453 reputation)SSC-Addicted (453 reputation)

Group: General Forum Members
Points: 453 Visits: 2549
The article states the following:

First off, you need SQL Server Enterprise Edition or Developer Edition. None of the other editions of SQL Server 2005 or 2008 support partitioning. SQL Server 2000 and earlier do not support partitioning at all.

This is not entirely correct, the devil is in the details!

Partitioning is supported, I believe all the way back to SQL Server 2000, but it works in an entirely different way then the more advanced method of partitioning functions. Which are indeed only available in Developer and Enterprise versions.

Here is an old script that I posted once on SQL ServerCentral.com to demonstrate partitioning at work using noting but several partition tables and a view to unify them as if they were one large table. And yes, you can insert in such views without writing any instead-of trigger on your part.

Some not so obvious restrictions (there always are those, sigh):

* When inserting records, you need to specify all columns, even those that accept NULL values.
* You cannot do a modification trough the view when the query also uses a "select" that references the unified view or one of its patritions.

The script is attached as a file for ease of use and contains some comments to help people on their way.
Attachments
simple_partitioning.zip (34 views, 1.00 KB)
amenjonathan
amenjonathan
SSC-Enthusiastic
SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)

Group: General Forum Members
Points: 136 Visits: 434
Are there any performance concerns when partitioning with a single filegroup apart from the restrictions on I/O increases from not using multiple disks? We're about to implement a partitioned table, and it looks like we're using just one filegroup. Every document I read talks on and on using 1 filegroup per 1 file, but I can't find much if any info on single filegroup solutions.

Secondly, I've read if you add an index to a partitioned table and you do not add the partitioned column to the index, SQL will add the partitioned column anyway in the background, thereby making any index added to a partitioned table aligned by default. Need some clarity on this point as well, because it has been suggested we do not need to add the partitioned column because of this. I would like to add it regardless just to be sure. Can't do that unless there's a reason.

-------------------------------------------------------------------------------------------------
My SQL Server Blog
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21099 Visits: 18259
Thanks for the article. I have a use for it already.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Lamprey13
Lamprey13
Old Hand
Old Hand (304 reputation)Old Hand (304 reputation)Old Hand (304 reputation)Old Hand (304 reputation)Old Hand (304 reputation)Old Hand (304 reputation)Old Hand (304 reputation)Old Hand (304 reputation)

Group: General Forum Members
Points: 304 Visits: 1657
peter-757102 (12/14/2010)
The article states the following:

First off, you need SQL Server Enterprise Edition or Developer Edition. None of the other editions of SQL Server 2005 or 2008 support partitioning. SQL Server 2000 and earlier do not support partitioning at all.

This is not entirely correct, the devil is in the details!

Partitioning is supported, I believe all the way back to SQL Server 2000, but it works in an entirely different way then the more advanced method of partitioning functions. Which are indeed only available in Developer and Enterprise versions.
<snip>
That is called a Partitioned View. Although it looks similar, it is different from Partitioned Tables.

@Hugh, does the other parts of your article disucss what happens to the data and you move partions around? Or more importantly, how to avoid data movement? I think this is one area of Partioned Tables that really bites people who don't understand how/why Microsoft setup partioned tables like they did.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search