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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:37:18+00:00 2026-06-13T08:37:18+00:00

I have a table in DB and it is approx 90 GB in space.

  • 0

I have a table in DB and it is approx 90 GB in space. I tried to count no of rows in the table
select count(idNewsNotification) from notification and it resulted

4982397

1 row in set (59 min 48.35 sec)

But when I queried using show table status like <table_name> it is showing that

 Engine: InnoDB
 Version: 10
 Row_format: Compact
 Rows: 8631267
 Avg_row_length: 11237
 Data_length: 96996425728
 Max_data_length: 0
 Index_length: 175374336
 Data_free: 0
 Auto_increment: NULL
 .....

What is the perfect procedure for knowing the no of records in the table ?

  • 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-13T08:37:20+00:00Added an answer on June 13, 2026 at 8:37 am

    The fact that your count took an hour implies that you’re running InnoDB (which doesn’t cache this data).

    As such, the table status is an approximation based on other factors, and is not to be trusted.

    The count(*) would be accurate, but a pain to wait for.

    From the doc:

    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.

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

Sidebar

Related Questions

I have a table (table variable in-fact) that holds several thousand (50k approx) rows
I have a table with approx 5 million rows which has a fk constraint
I have a set of approx 1 million rows (approx rowsize: 1.5kb) that needs
I have a fairly simple table with approx a million rows. id | my_col
I have a table that contains approx 10 million rows. This table is periodically
I have a table in which approx 100,000 rows are added every day. I
I have a view which displays content in a table (approx. 30 rows). I
I have following requirement - I have to 1.query a table and select approx
I have approx 10M rows of data across 20 tables, which I process once
I have table with around 70 000 rows. There is 6000 rows that i

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.