December 6, 2013 at 12:28 am
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
December 6, 2013 at 12:31 am
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
December 6, 2013 at 12:47 am
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)
note:(I tried to change the heading to elaborate, but i could not do.)
yous sincerly.
December 6, 2013 at 12:51 am
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
December 10, 2013 at 6:01 am
thank you,
but my question is still not answered.
yours sincerly.
December 10, 2013 at 6:08 am
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
December 10, 2013 at 6:11 am
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
December 11, 2013 at 5:03 am
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
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply