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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:56:33+00:00 2026-05-13T13:56:33+00:00

I am writing a new program and it will require a database (SQL Server

  • 0

I am writing a new program and it will require a database (SQL Server 2008). Everything I am running now for the system is 64-bit, which brings me to this question. For all of the Id columns in various tables, should I make them all INT or BIGINT? I doubt the system will ever surpass the INT range but it is a possibility within some of the larger financial tables I suppose. It seems like INT is the standard though…

  • 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-13T13:56:33+00:00Added an answer on May 13, 2026 at 1:56 pm

    OK, let’s do a quick math recap:

    • INT is 32-bit and gives you basically 4 billion values – if you only count the values larger than zero, it’s still 2 billion. Do you have this many employees? Customers? Products in stock? Orders in the lifetime of your company? REALLY?

    • BIGINT goes way way way beyond that. Do you REALLY need that?? REALLY?? If you’re an astronomer, or into particle physics – maybe. An average Line of Business user? I strongly doubt it

    Imagine you have a table with – say – 10 million rows (orders for your company). Let’s say, you have an Orders table, and that OrderID which you made a BIGINT is referenced by 5 other tables, and used in 5 non-clustered indices on your Orders table – not overdone, I think, right?

    10 million rows, by 5 tables plus 5 non-clustered indices, that’s 100 million instances where you are using 8 bytes each instead of 4 bytes – 400 million bytes = 400 MB. A total waste… you’ll need more data and index pages, your SQL Server will have to read more pages from disk and cache more pages…. that’s not beneficial for your performance – plain and simple.

    PLUS: What most programmer’s don’t think about: yes, disk space it dirt cheap. But that wasted space is also relevant in your SQL Server RAM memory and your database cache – and that space is not dirt cheap!

    So to make a very long post short: use the smallest type of INT that really suits your need; if you have 10-20 distinct values to handle – use TINYINT. If you need an order table, I believe INT should be PLENTY ENOUGH – BIGINT is only a waste of space.

    Plus: should any of your tables really ever get close to reaching 2 or 4 billion rows, you’ll still have plenty of time to upgrade your table to a BIGINT ID, if that’s really needed…….

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

Sidebar

Ask A Question

Stats

  • Questions 381k
  • Answers 381k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can launch your browser with OLE, and use the… May 14, 2026 at 10:04 pm
  • Editorial Team
    Editorial Team added an answer The typical way to handle situations like this is to… May 14, 2026 at 10:04 pm
  • Editorial Team
    Editorial Team added an answer does Safari completely remove the "file" input form from forms???… May 14, 2026 at 10:04 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.