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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:13:42+00:00 2026-05-18T07:13:42+00:00

I have a logging table that will contain millions of writes for statistical reasons.

  • 0

I have a logging table that will contain millions of writes for statistical reasons. All the columns are int foreign keys. I am also going to add a timestamp column for each row. Given that DATETIME takes 8bits – I will be using int(10) unsigned to cut the storage space (and index on that column) in half.

However, I’m wondering when this column would no longer work. At 3:14:07AM on 19th January 2038 the value 9,999,999,999 will be a problem for UNIX timestamps – but an unsigned int in MySQL only holds up to 4,294,967,295 and the timestamp 4294967295 is showing an invalid number in my PHP application.

So what does this mean? Is the end of the storing int timestamps in MySQL going to be sometime in 2021 since it can’t make it all the way to 9999999999?

Answer:

  1. 2147483647 is 2038 (not 9999999999) so there is no problem.
  2. unsigned isn’t needed since 2147483647 fits fine in a signed MySQL int.
  • 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-18T07:13:43+00:00Added an answer on May 18, 2026 at 7:13 am

    Standard UNIX timestamps are a signed 32bit integer, which in MySQL is a regular “int” column. There’s no way you could store 9,999,999,999, as that’s way outside the representation range – the highest a 32bit int of any sort can go is 4,294,967,295. The highest a signed 32bit in goes is 2,147,483,647.

    If/when UNIX timestamps go to a 64bit data type, then you’ll have to use a MySQL “bigint” to store them.

    As for int(10), the (10) portion is merely for display purposes. MySQL will still use a full 32bit internally to store the number, but only display 10 whenever you do a select on the table.

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

Sidebar

Related Questions

I use SQL Server 2005. I have a simple logging table that my web
I have an application that records activity in a table (Oracle 10g). The logging
I have a situation where I have a table that has a soft foreign
I have a table which needs 2 fields. One will be a foreign key,
I have a table for logging method calls. It has LogId, MethodId, DateTime columns.
I'm writing a simple logging service in DynamoDB. I have a logs table that
I have a logging table which has three columns. One column is a unique
We have a project where data is written to a logging table. Now, when
I have a logging class that stores entries in a datatable dt. I then
In my application, I have a 'logging' window, which shows all the logging, warnings,

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.