Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

will Collocation help in following situation. Expand / Collapse
Author
Message
Posted Friday, December 6, 2013 12:28 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 9:49 AM
Points: 48, Visits: 145
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
Post #1520426
Posted Friday, December 6, 2013 12:31 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:09 PM
Points: 40,172, Visits: 36,560
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 2008, MVP
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

Post #1520427
Posted Friday, December 6, 2013 12:47 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 9:49 AM
Points: 48, Visits: 145
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)


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

yous sincerly.
Post #1520435
Posted Friday, December 6, 2013 12:51 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:09 PM
Points: 40,172, Visits: 36,560
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 2008, MVP
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

Post #1520437
Posted Tuesday, December 10, 2013 6:01 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 9:49 AM
Points: 48, Visits: 145
thank you,

but my question is still not answered.

yours sincerly.
Post #1521481
Posted Tuesday, December 10, 2013 6:08 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:44 AM
Points: 12,905, Visits: 32,158
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1521484
Posted Tuesday, December 10, 2013 6:11 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:09 PM
Points: 40,172, Visits: 36,560
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 2008, MVP
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

Post #1521485
Posted Wednesday, December 11, 2013 5:03 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 9:49 AM
Points: 48, Visits: 145
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
Post #1521836
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse