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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:35:06+00:00 2026-05-16T10:35:06+00:00

Currently we’re using INT(21)* for all autoincrement id columns in out 30+ table database.

  • 0

Currently we’re using INT(21)* for all autoincrement id columns in out 30+ table database.

We are a blogging site, and have tables storing members, comments, blog posts and the like.

I’m quite sure we will never reach the limit of our INT(21) id columns, and would like to know:

  • If using INT(21) when I am sure we’ll never need it is a waste of space
  • If it is a waste, what the recommended size for an autoincrement id column is

*Not my design. I’m asking this because I’m considering reducing this to say, INT(10).

  • 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-16T10:35:07+00:00Added an answer on May 16, 2026 at 10:35 am

    The value within the brackets is the display width.

    [It] may be used by applications to display integer values having a width less than the width specified for the column by left-padding them with spaces. (That is, this width is present in the metadata returned with result sets. Whether it is used or not is up to the application.)

    The display width does not constrain the range of values that can be stored in the column, nor the number of digits that are displayed for values having a width exceeding that specified for the column. For example, a column specified as INT(3) has the usual INT range of -2147483648 to 2147483647, and values outside the range permitted by three characters are displayed using more than three characters.

    Conclusion

    INT(10) or INT(21), doesn’t impact the values that can be stored. If you really have a concern, the data type can easily be changed to be BIGINT with no repercussions that I’m aware of. I’d look at how many new records are being created in a given period (IE a month) & see how long it’ll take to max out the INT value based on that history.

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

Sidebar

Related Questions

Currently using a MySQL database Wanting to insert a new row into a table
Currently I have a date in my clients data table and it is stored
Currently, I have a log file of messages in one table in a MySQL
Currently we have a hybrid ASP/PHP setup connecting to a SQL Server 2005 database.
Currently I have this: var x = Convert.ToString(dateTimePicker2.Value.Subtract(dateTimePicker1.Value)); int xDays = Convert.ToInt32(x.Substring(0,1)); But it's
Currently I am using LinkedList to add all the Command information. How can I
Currently I am using HTML files for parts of my user interface. I display
currently, I`m implementing a map App with Mono4Droid and there I`m using a WebView
Currently, I'm working on a project where I have a server - client relationship
Currently I have 2 ways of displaying images in a cell, which way will

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.