Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Automate Sliding Window Partition Management: Part I Expand / Collapse
Author
Message
Posted Monday, December 13, 2010 10:08 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, April 3, 2014 7:35 PM
Points: 401, Visits: 166
Comments posted to this topic are about the item Automate Sliding Window Partition Management: Part I


Post #1034182
Posted Tuesday, December 14, 2010 1:23 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 11, 2013 3:17 AM
Points: 4, Visits: 17
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
Post #1034232
Posted Tuesday, December 14, 2010 5:02 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, April 3, 2014 7:35 PM
Points: 401, Visits: 166
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



Post #1034296
Posted Tuesday, December 14, 2010 6:54 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 11:25 AM
Points: 22, Visits: 309
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.
Post #1034349
Posted Tuesday, December 14, 2010 8:02 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 21, 2014 12:08 PM
Points: 1,414, Visits: 4,540
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?

https://plus.google.com/100125998302068852885/posts?hl=en
http://twitter.com/alent1234
x-box live gamertag: i am null
[url=http://live.xbox.com/en-US/MyXbox/Profile[/url]
Post #1034435
Posted Tuesday, December 14, 2010 8:36 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, February 18, 2011 7:17 AM
Points: 19, 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
Post #1034481
Posted Tuesday, December 14, 2010 8:59 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 3:01 AM
Points: 326, Visits: 2,220
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.


  Post Attachments 
simple_partitioning.zip (24 views, 1.11 KB)
Post #1034508
Posted Tuesday, December 14, 2010 10:22 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, December 16, 2013 10:42 AM
Points: 96, 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
Post #1034566
Posted Tuesday, December 14, 2010 10:46 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 3:07 PM
Points: 21,657, Visits: 15,325
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1034584
Posted Tuesday, December 14, 2010 11:55 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 3:50 PM
Points: 292, Visits: 1,623
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.
Post #1034632
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse