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

Partition Expand / Collapse
Author
Message
Posted Thursday, August 19, 2010 12:54 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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
Posted Tuesday, August 24, 2010 5:05 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 12:38 PM
Points: 3,864, Visits: 5,012
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
Posted Wednesday, August 25, 2010 12:21 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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
Posted Wednesday, August 25, 2010 12:45 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 12:38 PM
Points: 3,864, Visits: 5,012
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
Posted Wednesday, August 25, 2010 3:34 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 1, 2013 1:43 PM
Points: 18, Visits: 71
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
Posted Wednesday, August 25, 2010 4:06 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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
Posted Wednesday, August 25, 2010 4:24 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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
Posted Wednesday, August 25, 2010 4:36 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 12:38 PM
Points: 3,864, Visits: 5,012
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
Posted Wednesday, December 8, 2010 3:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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 »

Add to briefcase

Permissions Expand / Collapse