Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Partitioning tables

Author  Topic 

_sqllearner
Starting Member

9 Posts

Posted - 2007-05-04 : 16:06:55
How to partition tables in dynamic way?

I want to partion a table based on the client specific id and I want these values (client id's) to be passed dynamically to the create partition function.
I am not familiar with partitioning so it will be great if someone guides me (I am also reading some articles on partitioning, but it will be easier with some help)

The table I am trying to partition has like 80 million rows with four client's data as of now and will be more once we implement new clients.

I also think Partition will help, because before we load a client's data, we remove the data that is already out there (we flush previous qtr data before we insert this qtr data)

Any help will be appreciated.

Thanks
Raj

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-04 : 17:50:14
about partitioning:
http://weblogs.sqlteam.com/dmauri/archive/2005/07/18/7147.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-05-04 : 19:37:12
see
http://www.simple-talk.com/sql/sql-server-2005/partitioned-tables-in-sql-server-2005/

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-04 : 22:15:51
You like to partition table by id or date? From what you said, seems should partition by date.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-05-08 : 07:34:29
If the clients data is to be purged before the load then partitioning by client id would be good. You can load a table with the clients data then swap the partition so the table is only off-line for seconds.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -