Partition of table Base on Varchar COlumn

  • 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

  • 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[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • 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.

  • 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[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply