You are here: Re: Partition Optimization « MsSQL Server « IT news, forums, messages
Re: Partition Optimization

Posted by traceable1 on 09/14/07 14:18

Thank you!

So, is the groupid = data_space_id?

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

thanks!



On Sep 13, 5:04 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> traceable1 (thham...@gmail.com) writes:
> > I am trying to update my optimization jobs so they will not optimize
> > the older partitions (for performance and snapshot space reasons).
>
> > ALTER INDEX {indname} ON {tabname} REORGANIZE PARTITION = ?
>
> > I can get the partition, but my question is, how do I determine if the
> > index is in a partition I want to optimize?
>
> > I would like to use my groupname column in sysfilegroups, because I've
> > named them by year (YearFG04, YearFG05, etc). That is, I want to
> > optimize all indexes which DO NOT belong to YearFG04, YearFG05 and
> > YearFG06, but I DO want to optimize YearFG07 and PRIMARY.
>
> > But I don't know how to tie this back to the partition_number or
> > partition_id and therefore the index_id.
>
> > I've been looking at this all day, and I'm sure I'm blind, but I
> > cannot seem to find what i need.
>
> There are the view sys.partition_functions, sys.partition_parameters
> and sys.partition_range_values, but it does not seem exactly trivial
> to unwind them.
>
> If you want to work by filegroup name, it may be better to work from
> sys.allocation_units, which has a data-space id which is a file
> group id. And from sys.allocation_units you can work your way to
> sys.partitions.
>
> --
> Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
>
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx- Hide quoted text -
>
> - Show quoted text -

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация