Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8378697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:59:11+00:00 2026-06-09T15:59:11+00:00

I have a basic partitioning question. I have a table that looks like this:

  • 0

I have a basic partitioning question.

I have a table that looks like this:

CREATE TABLE [dbo].[WeatherStationData](
    [Time] [smalldatetime] NOT NULL,
    [pk_WS] [int] NOT NULL,
    [TemperatureF] [decimal](5, 1) NULL,
            ....
 CONSTRAINT [PK_WeatherStationData] PRIMARY KEY CLUSTERED 
(
    [Time] ASC,
    [pk_WS] ASC
) [PRIMARY]
) ON [PRIMARY]

I have created this partition function:

CREATE PARTITION FUNCTION pfWSD (DATETIME) AS RANGE RIGHT
FOR
VALUES (
    '01/01/2007', 
    '01/01/2008',
    '01/01/2009',
    '01/01/2010',
    '01/01/2011',
    '01/01/2012'
    );

And this partition scheme:

CREATE PARTITION SCHEME [psWSD] AS PARTITION [pfWSD] TO (
    [WSD0000]
    ,[WSD2007]
    ,[WSD2008]
    ,[WSD2009]
    ,[WSD2010]
    ,[WSD2011]
    ,[WSD2012]
    )

When i run:

SELECT $PARTITION.pfWSD([Time]) AS Partition, 
COUNT(*) AS [COUNT] FROM dbo.WeatherStationData
GROUP BY $PARTITION.pfWSD([Time])
ORDER BY Partition ;

The results look like this:

Partition   COUNT
----------- -----------
2           3396337
3           5408747
4           6576450
5           9602069
6           12650615
7           5577064

Yet, when I look at the underlying files, they are all 99% free (initial size was 2048MB, 2047MB free), and the primary file group is still large and mostly full. The table was empty and I loaded data into it after setting up the partitioning. I don’t think the partitioning worked, what else do I need to check?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:59:12+00:00Added an answer on June 9, 2026 at 3:59 pm

    Forgot to create the table on the partition scheme, should be:

    CREATE TABLE [dbo].[WeatherStationData](
        [Time] [smalldatetime] NOT NULL,
        [pk_WS] [int] NOT NULL,
        [TemperatureF] [decimal](5, 1) NULL,
            ....
     CONSTRAINT [PK_WeatherStationData] PRIMARY KEY CLUSTERED 
    (
        [Time] ASC,
        [pk_WS] ASC
    ) **psWSD([Time])**
    ) ON **psWSD([Time])**
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have basic code that looks like this: while(inputfileStream.good()) { for(int i = 0;i<levels;i++)
I have basic function that prints network errors based on enum NetworkError. that looks
I have basic knowledge of Java's reflection API - therefore, this is not only
I have a basic web service that returns the following object as JSON: public
I have a basic math question. I am trying to get a percentage from
I have basic issue that i don't understand, we use HEAT to consume directory
I have basic stored procedure that performs a full text search against 3 columns
I have basic idea about running PHP in different configurations like mod_php, cgi, FastCGI,
I have basic JavaScript code that needs to tell how many names out of
It seems like most of the messaging systems I've looked at have basic, if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.