Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Makes me wonder if anybody would find a SELECT APPROXIMATELY COUNT(*) useful, which would ignore the impact of current transactions.


While not "SELECT APPROXIMATELY COUNT (*)," both MySQL and PostgreSQL both offer various metadata tables with approximate (albeit completely unfiltered) total row counts.


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).


Note that HLL is used for counting `unique` things. You don't need HLL for counting the rows of the table.


Doesn't SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED do that? Or maybe a NOLOCK hint equivalent in MySQL?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: