Re: Number of records in a table
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
https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_stats_on_metadata
Subject
Written By
Posted
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.