Message boards :
Closed Issues :
Result table rows growing
Message board moderation
Author | Message |
---|---|
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Deprecated: Creation of dynamic property BoincUser::$nposts is deprecated in /var/boincadm/prj/html/inc/forum.inc on line 613 Posts: 667 Credit: 432,784 RAC: 0 |
There are 5'383'613 rows in "result" table according to dbinfo.php, which is about 5 times as much as I would expect. (Old/processed results are deleted by my program automatically.) However simple count query over the table reports only 236'865 rows. What is going on? |
Michael Goetz Send message Joined: 18 Feb 19 Deprecated: Creation of dynamic property BoincUser::$nposts is deprecated in /var/boincadm/prj/html/inc/forum.inc on line 613 Posts: 25 Credit: 147,831 RAC: 0 |
There are 5'383'613 rows in "result" table according to dbinfo.php, which is about 5 times as much as I would expect. (Old/processed results are deleted by my program automatically.) tl;dr: Believe what count(*) tells you rather than dbinfo.php. ops/dbinfo.php uses the SHOW TABLE STATUS command rather than SELECT COUNT(*). From the mysql documentation for SHOW TABLE STATUS: Rows I get some odd row counts on my system too, but not as bizarre as yours. I guess you're special! :) I wouldn't worry about it. Want to find one of the largest known primes? Try PrimeGrid. Or help cure disease at WCG. |
Tomáš Brada Project administrator Volunteer developer Send message Joined: 3 Feb 19 Posts: 667 Credit: 432,784 RAC: 0 |
After running ANALYZE on the results table, the estimated row count dropped to around 4 millions. The same value is shown as primary index cardinality in phpmyadmin. Mysql documentation confirms that the index cardinality is only approximate. It is interesting that the estimate is so massively off. Anyway, the count() is right and I do not have such crazy number of rows. If it was that high, it would mean I have error in the cleaner program. I do not need to worry about this more. |
©2024 Tomáš Brada