﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / Partition Function to an existing table / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 04:04:03 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Partition Function to an existing table</title><link>http://www.sqlservercentral.com/Forums/Topic779242-146-1.aspx</link><description>[quote][b]J Hines (8/25/2011)[/b][hr]This is EXACTLY what I am trying to do, only by month rather than week.  Did you ever get help with this?[/quote]1) Please don't post a "me too" to a 2 year old thread - start a new one.2) Partitioning is a VERY advanced topic where you can get yourself into trouble (and even make things much worse) if you don't know what you are doing.  PLEASE do yourself a favor and get some professional help for a little bit to make sure you know what you really need to do and how to properly implement/test/maintain it.</description><pubDate>Fri, 26 Aug 2011 08:13:06 GMT</pubDate><dc:creator>TheSQLGuru</dc:creator></item><item><title>RE: Partition Function to an existing table</title><link>http://www.sqlservercentral.com/Forums/Topic779242-146-1.aspx</link><description>Please take this for an example:CREATE PARTITION FUNCTION [myPF1] (datetime)AS RANGE LEFT FOR VALUES ('20110731', '20110807', '20110814', '20110821');CREATE PARTITION SCHEME myPS2AS PARTITION myPF1TO ( fg1, fg2, fg3, fg4 );This should be what will each filegroup(fg) contain:FG1= DATA &amp;lt;=20110731FG2= DATA &amp;gt; 20110731 AND DATA &amp;lt;= 20110807FG3= DATA &amp;gt; 20110807 AND DATA &amp;lt;= 20110814FG4= DATA &amp;gt; 20110821You can also modify the partition scheme to include a next filegroup. hope this helps.</description><pubDate>Thu, 25 Aug 2011 10:14:56 GMT</pubDate><dc:creator>jomar.imbat</dc:creator></item><item><title>RE: Partition Function to an existing table</title><link>http://www.sqlservercentral.com/Forums/Topic779242-146-1.aspx</link><description>This is EXACTLY what I am trying to do, only by month rather than week.  Did you ever get help with this?</description><pubDate>Thu, 25 Aug 2011 09:14:12 GMT</pubDate><dc:creator>J Hines</dc:creator></item><item><title>Partition Function to an existing table</title><link>http://www.sqlservercentral.com/Forums/Topic779242-146-1.aspx</link><description>Table with 120 Million rows in SQL2005. This table grows around 400, 000 rows everyday. Insertion is made by a package every morning. In order to improve performance in the insertion into the table, I’m planning to do a partition.  Table has clustered index (id, date). [b]What's the best partition function for this case????[/b]Here is what I'm trying to do:--------------------------------- partition functionCREATE PARTITION FUNCTION function (date)AS RANGE LEFT FOR VALUES  (week1, week2, week 3) ----&gt; what I should write exactly in "week1"....-- partition schemeCREATE PARTITION SCHEME schemeAS PARTITION functionALL TO (week1, week2.....) -- file groups will be located in different drives-- move existing table/data to new partitionALTER TABLE [table] DROP CONSTRAINT PK_constraint WITH (MOVE TO [scheme] (Date))   note: how I move the data to the exact week ????? am I using the correct syntax?ALTER TABLE [table] ADD CONSTRAINT PK_Constraint PRIMARY KEY(ID, Date)I hope to hear your advices </description><pubDate>Fri, 28 Aug 2009 11:13:09 GMT</pubDate><dc:creator>MTY-1082557</dc:creator></item></channel></rss>