From my experience, most of my waiting time is IO, not CPU load. Even simple stuff, such as SELECT COUNT(*) to display total count in grid on big table can take seconds. It does not have to be complicated.
You may be confused about how databases work. COUNT(*) is not "simple stuff". It almost always involves an index _scan_. For tables with millions of rows, it takes a while.
You have a problem. And it’s probably related to your db architecture, which was probably designed by devs with ORMs.
What kind of database architecture could cause SELECT * to be slow?
Any. "Architecture" has nothing to do with that. SELECT COUNT(*) is usually "slow".
Makes sense: devs with ORMs don't know about indexes, which are proper DB architecture.
>Even simple stuff, such as SELECT COUNT(*)
edit seems like my old performance book was outdated or wrong :(
Nope. Not even close.
SELECT COUNT(*) should be the one which is resolved by index/metadata