為什麼主視窗中的資料表列數不正確?
更新於
可應用作業系統:Windows、macOS、Linux
可應用 Navicat 產品:Navicat for MySQL、Navicat for PostgreSQL、Navicat for Oracle、Navicat for MariaDB、Navicat Premium
MySQL 和 MariaDB
在資料表主檢視,如果你選擇詳細資料檢視,顯示的列數目,只是一個估計的記錄數目,但不是精確的。
這是一個 MySQL InnoDB 資料表的內容,關於這個問題請參閱 MySQL 文件: https://dev.mysql.com/doc/refman/8.0/en/show-table-status.html
"Rows --
The number of rows. Some storage engines, such as MyISAM and ISAM, 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."
PostgreSQL
列欄只是一個估計值,反映了 pg_class 資料表的 "reltuples" 值,但不是精確的。
Oracle
列數目只會在收集數據後才更新(例如,在資料表按一下滑鼠右鍵,並選擇維護 > 收集資料表統計資料)。
還有其他問題嗎?
-
合作夥伴