Re:Is 20M of rows still a valid soft limit of MySQL table in...
by jl6 on Tuesday May 23, 2023 @03:12AM
(#36040946)
Makes me wonder if anybody would find a SELECT APPROXIMATELY COUNT(*) useful, which would ignore the impact of current transactions.
[ Parent
| on HN ]
Re:Is 20M of rows still a valid soft limit of MySQL table in...
by qeternity on Tuesday May 23, 2023 @03:18AM
(#36041003)
Many DB systems have some sort of HLL function to provide a similar approximation (although I think you’re overestimating the costs that MVCC impose on large datasets).
Re:Is 20M of rows still a valid soft limit of MySQL table in...
by ddorian43 on Tuesday May 23, 2023 @07:48AM
(#36042972)
Note that HLL is used for counting `unique` things. You don't need HLL for counting the rows of the table.
Re:Is 20M of rows still a valid soft limit of MySQL table in...
by 15155 on Tuesday May 23, 2023 @07:45AM
(#36042948)
While not "SELECT APPROXIMATELY COUNT (*)," both MySQL and PostgreSQL both offer various metadata tables with approximate (albeit completely unfiltered) total row counts.
Re:Is 20M of rows still a valid soft limit of MySQL table in...
by newphonnewaccnt on Tuesday May 23, 2023 @09:18AM
(#36043836)
I think you can use
Explain select count(*)
If you're only after a (update: really rough) rough value