Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Partitioned tables


Partitioned tables

Author
Message
sunny.tjk
sunny.tjk
Old Hand
Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)

Group: General Forum Members
Points: 327 Visits: 1344
We've a very large table and I'm thinking to partition it. Either one of these 3 main columns(appid, date or loan_custid) are used in the WHERE clause of the queries.
I've never implemented partitioning before, so my question is should I partition it by the date or appid or loan_custid?
sunny.tjk
sunny.tjk
Old Hand
Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)

Group: General Forum Members
Points: 327 Visits: 1344
Hi everyone,
Could someone please help me with this? I can provide more info if needed.
s_bohari 44266
s_bohari 44266
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 10
Hi,
It all depends on your system. Difficult to say if you should do it by date, id or something else.

The last time I partioned a table I had two parts an historic part and one current, which was partioned by a integer flag that stated if it was a historic part or current.

Best regards,
Shakir
TheSQLGuru
TheSQLGuru
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5935 Visits: 8298
sunny.tjk (9/11/2012)
We've a very large table and I'm thinking to partition it. Either one of these 3 main columns(appid, date or loan_custid) are used in the WHERE clause of the queries.
I've never implemented partitioning before, so my question is should I partition it by the date or appid or loan_custid?


Partitioning is a VERY COMPLEX subsystem and it is VERY easy to get things messed up. Without professional guidance you are very unlikely to be successful in your endeavor. I have come across MANY clients and forum posters that attempted partitioning without proper help and were disappointed or worse. Some questions/recommendations:

1) WHY do you think you need to partition the table? You mention columns that are in a WHERE clause, making me believe you want to use partitioning as a "go fast" button. That is NOT what it was designed for!! It was built primarily to facilitate large table management and especially loading.

2) What is the data loading process for this table?

3) What is the exact and full create-table script for this table (including triggers, keys, indexes)?

4) I STRONGLY recommend you get a professional on board to help you understand your system and whether or not you NEED partitioning and then help you implement, maintain, monitor it correctly. It is quite possible that you simply need to TUNE your existing queries against this table or do other stuff to make things "go fast"!!

Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)

Group: General Forum Members
Points: 8231 Visits: 14368
Following along with Kevin's post, think it through carefully. Here is a nice write up I recently found to help you consider all points of why you might employ partitioning, the benefits and the drawbacks:

How To Decide if You Should Use Table Partitioning (March 6, 2012) by Kendra Little

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47174 Visits: 44353
sunny.tjk (9/11/2012)
We've a very large table and I'm thinking to partition it.


Why?


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


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