What is the complexity of this MySQL query
SELECT COUNT(*) FROM MyTable;
Is the count of number of entries in a table stored somewhere and updated every time a row is inserted or deleted? If that is the case, then the complexity should be O(1).
See Question&Answers more detail:os