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


will Collocation help in following situation.


will Collocation help in following situation.

Author
Message
rajemessage 14195
rajemessage 14195
Say Hey Kid
Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)

Group: General Forum Members
Points: 664 Visits: 366
Hi,

I was trying to partition my tables , and also read about Collocation.

q1) I would like to know whether i will get benefit of Collocation in following situation or not.

q2) Should i make clusterd index on partition key Pid

q3) will it get benefit from partitioning.

I have a table "A" and "B" with many columns and it has one Partition key Pid with is not unique.
with in a table Pid repeates 3 or 4 times.

Both are partitioned, since the partition key is not unique.
so at many places i have to use following query.

1) Select * from A
join (select Distinct pid , tname from B) B1
on A.pid = B.pid
where ......

2) Select * from A
where exist (select pid , tname from B
on A.pid = B.pid
)

yours sincerly
GilaMonster
GilaMonster
SSC Guru
SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)

Group: General Forum Members
Points: 232000 Visits: 46354
What do you mean by 'collocation'? The definition I'm familiar with is 'the action of placing things side by side or in position', which doesn't make sense here.

As for the partitioning, what's the goal of the partitioning? What are you trying to achieve by partitioning the table?

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


rajemessage 14195
rajemessage 14195
Say Hey Kid
Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)

Group: General Forum Members
Points: 664 Visits: 366
I am trying to get speed by making one table out of many table joins from queries.
and collocation is stroger form of alignment of partitioning (mssql 2005)


noteSadI tried to change the heading to elaborate, but i could not do.)

yous sincerly.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)

Group: General Forum Members
Points: 232000 Visits: 46354
If you're trying to get queries running faster, don't waste your time looking at partitioning, it's not a general performance tuning technique. Performance improvements are possible from partitioning, but it usually requires that the queries are written specifically to take advantage of the partitioning.

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


rajemessage 14195
rajemessage 14195
Say Hey Kid
Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)

Group: General Forum Members
Points: 664 Visits: 366
thank you,

but my question is still not answered.

yours sincerly.
Lowell
Lowell
SSC Guru
SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)

Group: General Forum Members
Points: 74605 Visits: 40983
the answer is no, then.
speeding up of the queries will require indexing changes /additions based on the common WHERE statements being used;
partitioning for performance, like Gail mentioned, is WAY on the bottom of the list for things to tackle when improving performance.

Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
GilaMonster
GilaMonster
SSC Guru
SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)SSC Guru (232K reputation)

Group: General Forum Members
Points: 232000 Visits: 46354
rajemessage 14195 (12/10/2013)
but my question is still not answered.


I answered your question

If you're trying to get queries running faster, don't waste your time looking at partitioning


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


rajemessage 14195
rajemessage 14195
Say Hey Kid
Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)

Group: General Forum Members
Points: 664 Visits: 366
Please confirm
query no 1) and 2) will not get the benefit of alignment/collocation,
if i use them in exists or derived table?

yours sincerly
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