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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:08:59+00:00 2026-06-07T13:08:59+00:00

In one of my projects, the current implementation of a log system uses a

  • 0

In one of my projects, the current implementation of a log system uses a mysql table. The applications released to customers write some log information to the table on a daily basis. There is a script on our server to automatically remove all logs that are more than 60 days old. The problem is that the primary id keeps growing and some time in the future, it will outgrow the limit. The id currently is set to int auto_increment. So what’s the best solution for this problem. I am no expert in database and your help is highly appreciated. I tried to search on Stack Overflow but could not find answer for my case.

Should I change int to bigint? How do I do that without interrupting the db’s normal operation? I want to avoid any down time. But even with bigint, the id will reach the limit one day. It looks like I am just delaying the problem. Is there a good solution? Can I configure the db so it can re-use ids that become available after the script removes old data?

  • 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-07T13:09:01+00:00Added an answer on June 7, 2026 at 1:09 pm

    Try not to delete the table, but archive the content after 60 days i.e. delete from the main table and insert into the archived table. For the second issue, if the value of the PK is increasing like hell try the type ‘bigint’

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

Sidebar

Related Questions

In one of my current projects, i'm making use of a single-user authentication system.
For one of my current iOS project, some business logic has been provided to
After numerous projects one-way asynchronous message passing looks like the only way to write
Current Implementation Sql Server 2005 Database with a table called messages with a column
This question is vital to one of my current projects involving creating HTML tables
For one of my projects, I want to implement a complete PAM implementation for
In one of my current projects I have a dropdown (select) form element. I
For some current projects, I'm working with several data structures that are pretty large
I'm using a third party C++ lib in one of my current projects. Their
One of the data structures in my current project requires that I store lists

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.