SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Partition of table Base on Varchar COlumn


Partition of table Base on Varchar COlumn

Author
Message
sudhirnune
sudhirnune
SSC-Enthusiastic
SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)

Group: General Forum Members
Points: 198 Visits: 252
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
Evil Kraig F
Evil Kraig F
SSCrazy Eights
SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)

Group: General Forum Members
Points: 8709 Visits: 7660
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
sudhirnune
sudhirnune
SSC-Enthusiastic
SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)SSC-Enthusiastic (198 reputation)

Group: General Forum Members
Points: 198 Visits: 252
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.
Evil Kraig F
Evil Kraig F
SSCrazy Eights
SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)

Group: General Forum Members
Points: 8709 Visits: 7660
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search