What is the Big-O (O(?)) for counting the number of rows in a MySQL table?
SELECT COUNT(*) rows FROM myTable
I could not find this information in the documentation, but in this case, I am assuming that there is no WHERE
or GROUP BY
.
What is the Big-O (O(?)) for counting the number of rows in a MySQL table?
SELECT COUNT(*) rows FROM myTable
I could not find this information in the documentation, but in this case, I am assuming that there is no WHERE
or GROUP BY
.
This is a duplicate of MySQL - Complexity of: SELECT COUNT(*) FROM MyTable;.
For those curious on what "big-O" means, it refers to the time complexity of a computational operation.