Afficher un message
Vieux 14/09/2007, 23h24   #4
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Partition Optimization

traceable1 (thhamlin@gmail.com) writes:
> So, is the groupid = data_space_id?


The relation of sys.data_spaces, sys.destination_data_spaces and
sys.filegroups is a bit complicated. A filegroup is a data space,
but the opposite does not apply.

> Then is the data_space_id = partition_number? I'm still having
> trouble getting from allocation_units to partitions.


No, the data_space_id is not the partition number. Instead you join
sys.allocation_units to sys.partitions over the container_id,
and to make it even more complicated, you join to different columns
in sys.partitions depending on type of allocation unit. In sys.partitions
you find the partition number.

I'm sorry that I don't simply give you a query, but I don't have any
multiple-filegroup database set up, so I can't test.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
 
Page generated in 0,04881 seconds with 9 queries