MySQL Forums
Forum List  »  General

Re: Number of records in a table
Posted by: Peter Brawley
Date: January 08, 2022 10:42AM

Rowcounts in non-transactional tables (eg MyISAM) are given by ...

select count(*) from tablename;

In a transactional (ie InnoDB) table, the issue is more complicated---there may be insertions or deletions hidden in transactions which your executing client has no access to, the above query gives only an estimate, there is no such thing as a provably correct rowcount, eg see

Options: ReplyQuote

Written By
Re: Number of records in a table
January 08, 2022 10:42AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.