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 8748527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:32:23+00:00 2026-06-13T12:32:23+00:00

when partitioning tables in MySQL using a list, how can I generate a partition

  • 0

when partitioning tables in MySQL using a list, how can I generate a partition for remaining items?

E.G:

CREATE TABLE tbl
(
 ID integer
)
PARTITION BY LIST (ID)
(  
  PARTITION P1 values in (1),  
  PARTITION P2 values in (2),  
  PARTITION P3 values in (3),  
  PARTITION Pother values in (<all remaining values of ID>)
);

In Oracle, I use values in (default), but that does work in MySQL.

  • 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-13T12:32:24+00:00Added an answer on June 13, 2026 at 12:32 pm

    Unlike range partitioning, there is no “catch-all” in list partitioning. To quote the documentation:

    Unlike the case with RANGE partitioning, there is no “catch-all” such
    as MAXVALUE; all expected values for the partitioning expression
    should be covered in PARTITION … VALUES IN (…) clauses. An INSERT
    statement containing an unmatched partitioning column value fails with
    an error…

    Unfortunately, I believe, you’re not able to combine a list and a range partition either. I’m not entirely certain why you would want to use a list partition in this particular instance; wouldn’t a range partition work just a well?

    CREATE TABLE tbl
    (
     ID integer
    )
    PARTITION BY RANGE (ID)
    (  
      PARTITION P1 values less than (2),  
      PARTITION P2 values less than (3),  
      PARTITION P3 values less than (4),  
      PARTITION Pother values less than maxvalue
    );
    

    I’m assuming that this is just an example. Partitioning each key in a primary key is a little pointless.

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

Sidebar

Related Questions

I know that horizontal partitioning...you can create many tables. How can you do this
Ok guys, just starting out with partitioning some tables in mySQL. There's a couple
I am experimenting with mysql partitioning ( splitting the table up to help it
Do I need to update my software to support partitioned table? Does partitioning tables
I set up a set of partitioned tables per the docs at http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html CREATE
I have a log table that is inherited by several tables: CREATE TABLE log
I have an MySQL table: CREATE TABLE responses ( id INT NOT NULL AUTO_INCREMENT,
Given the following table partitioning under PostgreSQL 9.0.3: CREATE TABLE records ( ts TIMESTAMP,
I have mysql table Stop_Times with 20 Million records. I am using MyISAM storage
We have a partitioned view with 12 member tables. The partitioning column is a

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.