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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:05:37+00:00 2026-05-31T12:05:37+00:00

There is a large table that holds millions of records. phpMyAdmin reports 1.2G size

  • 0

There is a large table that holds millions of records. phpMyAdmin reports 1.2G size for the table.

There is a calculation that needs to be done for every row. The calculation is not simple (cannot be put in set col= calc format), it uses a stored function to get the values, so currently we have for each row a single update.

This is extremely slow and we want to optimize it.

Stored function:
https://gist.github.com/a9c2f9275644409dd19d

And this is called by this method for every row:
https://gist.github.com/82adfd97b9e5797feea6

This is performed on a off live server, and usually it is updated once per week.

What options we have here.

  • 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-31T12:05:38+00:00Added an answer on May 31, 2026 at 12:05 pm

    Why not setup a separate table to hold the computed values to take the load off your current table. It can have two columns: primary key for each row in your main table and a column for the computed value.

    Then your process can be:

    a) Truncate computedValues table – This is faster than trying to identify new rows

    b) Compute the values and insert into the computed values table

    c) So when ever you need your computed values you join to the computedValues table using a primary key join which is fast, and in case you need more computations well you just add new columns.

    d) You can also update the main table using the computed values if you have to

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

Sidebar

Related Questions

I have table with articles and there is around 150.000 of records, in that
There is a multithreads application, that works with large DB file (>600 Mb). Database
Say there is a dict variable that grows very large during runtime - up
I use SQL Server. I got a large table - millions of rows. And
I have a large mysql table that I would like to transfer to a
I have a large table of supplemental data that is filled in from a
I'm trying to get 4 random results from a table that holds approx 7
I have a 2 row table pertaining of a number, and that numbers cube.
I have a table that stores the summed values of a large table. I'm
I have a table that is exposed to large inserts and deletes on 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.