Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008
    Posts
    5

    Unanswered: PartitionFunction & PartitionScheme

    Can someone tell me what is the benefit of using PartitionFunction & PartitionScheme?
    Has anyone actually used them over the big, big size of a table?
    If so, how did you like it?

    Thank you in advance.

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    I use it. I have tables with more than 1b rows, and it works well. The main benefit I see is that if you have N partitions, you only have 1 table, 1 set of indexes, statistics, etc to manage.

    if you use separate tables unioned in a view (partitioned view), then you have N tables to manage, each with its own indexes, statistics, etc. more to manage.

  3. #3
    Join Date
    Jan 2008
    Posts
    5

    Is there any other way?????

    There is a colum for SITE, and SITE can be several hundreds....
    I want to create partitions according to SITE such as

    CREATE PARTITION FUNCTION siteFunc (char(3))
    AS RANGE
    FOR VALUES ('ABC', 'DEF', 'MNX', ,,,,,)

    Looks like I need to type in those sites of several hundreds one by one...

    Is there any better way to create partition for these sites, like
    using some do while loop?

    Thank you.

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    this?

    select distinct ',''' + site + '''' from table_that_has_all_your_sites_in_it

    and then just paste the result into parens in the FOR VALUES () part.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •