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 of table Base on Varchar COlumn Expand / Collapse
Author
Message
Posted Thursday, June 6, 2013 5:11 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, March 6, 2014 11:47 PM
Points: 86, Visits: 214
Hi team,

I am looking for Partitioning / Slip the Data in a table to Multiple Small Files.

Logical Partition can be done based on a Varchar Column WHich store currency code

EX:

SELECT CUR_CODE, COUNT(*) FROM TEST GROUP BY CUR_CODE

O/P:

GBP - 10000
USD - 20000
SGD - 30000

But when I try to create partition, on providing the Split Criteria and details and hit Estimate storage

It show the details in this way

GBP 1
USD 50000
SGD 1

Please need input to split the data based on the Value in the COlumn, Expecting to Send the Data to Each Currency File


GBP.ndf - 10000
USD.ndf - 20000
SGD.ndf - 30000

Thanks in advance
Post #1460928
Posted Thursday, June 6, 2013 5:42 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:32 AM
Points: 5,408, Visits: 7,537
I just want to clarify, you're looking to setup table partitioning within the schema of the database to multiple filegroups, correct? The reason I'm trying to clarify is because I've never seen an estimate for storage before, are you using a wizard?

Additionally, is there an index on the field you're looking to partition across? I'm wondering if the statistics are just wildly off. If there's an index on that field, UPDATE STATISTICS WITH FULLSCAN the table and see what kind of estimates you get.

Finally, and I hope you're on a dev system, just chuck the estimates out and do your partition. Then go to the dm_ views and check your partition sizes with actuals. Estimates are notorious for being wrong.




- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1460929
Posted Saturday, June 8, 2013 3:11 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, March 6, 2014 11:47 PM
Points: 86, Visits: 214
I just want to clarify, you're looking to setup table partitioning within the schema of the database to multiple filegroups, correct?
> Yes I am trying to Partition my table, here. with multiple file group and multiple files.
Ex: USD will have USD_FG and USD_FILE.ndf file

The reason I'm trying to clarify is because I've never seen an estimate for storage before, are you using a wizard?
> Yes I was using Partition based on Wizard

Additionally, is there an index on the field you're looking to partition across? I'm wondering if the statistics are just wildly off. If there's an index on that field, UPDATE STATISTICS WITH FULLSCAN the table and see what kind of estimates you get.

> No Indexed are on the table

Finally, and I hope you're on a dev system, just chuck the estimates out and do your partition. Then go to the dm_ views and check your partition sizes with actuals. Estimates are notorious for being wrong.

> Yes Im on a test DB, I will Test it.
Post #1461302
Posted Monday, June 10, 2013 1:11 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:32 AM
Points: 5,408, Visits: 7,537
sudhirnune (6/8/2013)

Additionally, is there an index on the field you're looking to partition across? I'm wondering if the statistics are just wildly off. If there's an index on that field, UPDATE STATISTICS WITH FULLSCAN the table and see what kind of estimates you get.

> No Indexed are on the table



Sorry, fell off the earth a bit on this. You have no indexes? No wonder you can't get a good estimate. If this table is a heap you're not going to get any performance increases from partitioning, you're aware of that, right?

Partitioning is more an administrative tool to ease data manipulation, not an optimization tool.



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1461736
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse