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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:18:29+00:00 2026-06-09T12:18:29+00:00

Without any changes on database I got very different rows count on my tables.

  • 0

Without any changes on database I got very different rows count on my tables.

What can cause this?

enter image description here

enter image description here

Server version: 5.1.63-cll
Engine: InnoDB
  • 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-09T12:18:31+00:00Added an answer on June 9, 2026 at 12:18 pm

    Unlike MyISAM tables, InnoDB tables don’t keep track of how many rows the table contains.

    Because of this, the only way to know the exact number of rows in an InnoDB table is to inspect each row in the table and accumulate a count. Therefore, on large InnoDB tables, performing a SELECT COUNT(*) FROM innodb_table query can be very slow because it does a full table scan to get the number of rows.

    phpMyAdmin uses a query like SHOW TABLE STATUS to get an estimated count of the number of rows in the table from the engine (InnoDB). Since it’s just an estimate, it varies each time you call it, sometimes the variations can be fairly large, and sometimes they are close.

    Here is an informative blog post about COUNT(*) for InnoDB tables by Percona.

    The MySQL manual page for SHOW TABLE STATUS states:

    The number of rows. Some storage engines, such as MyISAM, store the
    exact count. For other storage engines, such as InnoDB, this value is
    an approximation, and may vary from the actual value by as much as 40
    to 50%. In such cases, use SELECT COUNT(*) to obtain an accurate
    count.

    The page on InnoDB restrictions goes into some more detail:

    SHOW TABLE STATUS does not give accurate statistics on InnoDB tables, except for the physical size reserved by the table. The row count is only a rough estimate used in SQL optimization.

    InnoDB does not keep an internal count of rows in a table because
    concurrent transactions might “see” different numbers of rows at the
    same time. To process a SELECT COUNT(*) FROM t statement, InnoDB scans
    an index of the table, which takes some time if the index is not
    entirely in the buffer pool. If your table does not change often,
    using the MySQL query cache is a good solution. To get a fast count,
    you have to use a counter table you create yourself and let your
    application update it according to the inserts and deletes it does. If
    an approximate row count is sufficient, SHOW TABLE STATUS can be used.
    See Section 14.3.14.1, “InnoDB Performance Tuning Tips”.

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

Sidebar

Related Questions

I need a Query that without any changes work on these three different database
I tried without any result. My code looks like this: #include stdafx.h #include <iostream>
I have two tables without any cascade deleting. I want to delete parent object
I tried this aproach without any success the code I'm using: // File name
remove() method without any argument removes all documents inside the collection. $this->db->$collection->remove(); But how
I've got a new database here and it's an upgraded version from Oracle 10g
How may I modify a XML file without any change like attributes ordering, tag
I want to change RSA Keys to open ssh connections without any problems. It
I'm trying to change the printer tray using the Python win32print module without any
Without using any other jquery plugin I'm looking to continuously flash/change a div's border

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.