Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Development
»
Partition
Partition
Rate Topic
Display Mode
Topic Options
Author
Message
ningaraju.n
ningaraju.n
Posted Thursday, August 19, 2010 12:54 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, February 21, 2013 3:14 AM
Points: 134,
Visits: 425
Hi All,
I have a table which has around 50 million records and its increasing exponentially, and it stores the information of user and his attended question details for eg:sample data looks like this
ScheduleUserId,QuestionId,MaxScore,UserScore,IsCorrect,HintUsed
2345 32 2 2 1 0
2345 33 2 0 0 0
etc
we thought of doing the partition please provide some good approaches for this .
Post #971642
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
Posted Tuesday, August 24, 2010 5:05 AM
Hall of Fame
Group: General Forum Members
Last Login: Yesterday @ 1:49 AM
Points: 3,123,
Visits: 4,310
Question to consider:
> which column is likely to be used in range-based searches (usually the column with the clustered index)?
This would be the column to effect the partition on, e.g. using range left for customer for values 1000, 2000, 3000 etc
> how many filegroups and physical files would be required (to split the data accross numerous drives, if applicable)?
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #974014
ningaraju.n
ningaraju.n
Posted Wednesday, August 25, 2010 12:21 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, February 21, 2013 3:14 AM
Points: 134,
Visits: 425
Thanks stewart,
We are using the scheduleuserid in most of the cases in where clause and sometimes questionId along with that.
and currently we have only one file group .
please suggest.
Post #974649
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
Posted Wednesday, August 25, 2010 12:45 AM
Hall of Fame
Group: General Forum Members
Last Login: Yesterday @ 1:49 AM
Points: 3,123,
Visits: 4,310
ningaraju.n (8/25/2010)
Thanks stewart,
We are using the scheduleuserid in most of the cases in where clause and sometimes questionId along with that.
and currently we have only one file group .
please suggest.
based on you reply, I would recommend
> creating at least one new filegroup (with associated physical file);
> build the partition function using the column most frequently used in range-based searches (scheduleuserid), using, for example, the ranges as shown in my first post on this subject;
> create the partition scheme to link the partition function to the new filegroup;
> build the table on the new partition scheme;
> create the clustered index on the partitioned column, also on the new partition scheme;
> Refer to books online with regard to the rules governing indexes on partitioned tables:
http://msdn.microsoft.com/en-US/library/ms188706(v=SQL.90).aspx
or Kimberly Tripp's article:
http://msdn.microsoft.com/en-us/library/ms345146(SQL.90).aspx
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #974656
Marcos Leandro Rosa
Marcos Leandro Rosa
Posted Wednesday, August 25, 2010 3:34 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, July 12, 2012 12:03 PM
Points: 17,
Visits: 70
Hi,
Just a matter of complementing our friend's answer:
How many disk do you have available to spread your files?
Why do you want to split your table? [Is it for increasing performance?]::[Is it a matter of space?]
You have also to create a Partitioned Index and not just common index to get best performance.
First of all you have to measure why you want to have the database split then we can go with further investigation.
You can see my youtube channel I have a video talking about partitioned tables
http://www.youtube.com/watch?v=HDx8XCoAw3w
Best Regards,
Marcos Rosa / marcosfac@gmail.com
Post #974707
ningaraju.n
ningaraju.n
Posted Wednesday, August 25, 2010 4:06 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, February 21, 2013 3:14 AM
Points: 134,
Visits: 425
Thanks stewart,
I understand most of your points except the below point
>build the table on the new filegroup
I have to do partition for existing table
and can you please suggest the way to do that point('build the table on the new filegroup')
Post #974717
ningaraju.n
ningaraju.n
Posted Wednesday, August 25, 2010 4:24 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, February 21, 2013 3:14 AM
Points: 134,
Visits: 425
Thanks Rosa,
I don't know about the availability of disks,but we want partition to improve the performance
Please suggest in this regard
Post #974722
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
Posted Wednesday, August 25, 2010 4:36 AM
Hall of Fame
Group: General Forum Members
Last Login: Yesterday @ 1:49 AM
Points: 3,123,
Visits: 4,310
ningaraju.n (8/25/2010)
Thanks stewart,
I understand most of your points except the below point
>build the table on the new filegroup
I have to do partition for existing table
and can you please suggest the way to do that point('build the table on the new filegroup')
There are 2 methods of doing so.
Please refer to
http://msdn.microsoft.com/en-US/library/ms175864(v=SQL.90).aspx
for details (specifically the section regarding Converting a Nonpartitioned Table to a Partitioned Table)
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #974725
antonyrajcletus
antonyrajcletus
Posted Wednesday, December 08, 2010 3:43 AM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, April 12, 2011 8:17 AM
Points: 1,
Visits: 7
Hi
Actually I have a requirement as below
1) To have a database in sql server 2008 with a set of tables (which will have the fields snapshotdate and frequency along with other data fields)
2) This set of tables should maintain only the latest 2 daily snapshot dates of data and latest 3 monthly snapshot dates of data and the older one should be removed everytime the new data comes in.
--> Please let me know the complete steps of how we can do it through partitions in SQL server 2008 which I require very urgently
Thanks,
Cletus
Post #1031760
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.