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

  • Home
  • SEARCH
  • 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 3980070
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:14:49+00:00 2026-05-20T05:14:49+00:00

How to create a partitioned index on a table which is not partitioned although

  • 0

How to create a partitioned index on a table which is not partitioned although there is a partition function and scheme available. It is an exercise I read somewhere, not a real problem

create partition function func(datetime)
as range right for values
('20040601', '20050601')
go
create partition scheme scheme1
as partition func
to ('primary')
go

create table student
(
studentid int not null primary key nonclustered,
firstname varchar(30) not null,
date datetime not null
)

i was thinking of

create clustered index IX_StudentID_Date
on student(studentid, date)

but the table is not partitioned, so how to create the index, without partitioning the table?

  • 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-05-20T05:14:49+00:00Added an answer on May 20, 2026 at 5:14 am

    When you partition the “table” you are actually partitioning the clustered index. So partitioning a non clustered index is actually the same as partitioning a “table”

        CREATE NONCLUSTERED INDEX IX_StudentID_Date 
            ON student(studentid, date) 
            ON scheme1(date)   
    

    you just have to make sure that the partition field is part of the index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table 'X' and did the following CREATE PARTITION FUNCTION PF1(INT) AS
Most examples dealing with table partitions, create the table on the partition scheme. For
Is there any tool to create a new partition on windows CE device? Device
create table ImagenesUsuario { idImagen int primary key not null IDENTITY } This doesn't
This is my table CREATE TABLE IF NOT EXISTS `results_stock_all` ( `Result_Id` varchar(50) NOT
I am referring to http://www.if-not-true-then-false.com/2009/11/howto-create-postgresql-table-partitioning-part-1/ To reproduce the problem, here is some simple steps
I created a hive table as in Create external with Partition I am using
I'm comparing between two techniques to create partitioned tables in SQL 2005. Use partitioned
create table person ( name varchar(15), attr1 varchar(15), attr2 varchar(1), attr3 char(1), attr4 int
CREATE TABLE #Report( Cell int, CellValue double) Error here DECLARE @Report TABLE ( Cell

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.