I can\'t seem to find a relevant example out there.
I\'m trying to return a sub-set of a table, and for each row in that table, I want to check how many children it has,
Did you ever try to add an index to parent id for MySQL. I'm pretty sure the exection times will improve vastly. Haven't tested but I would say that MySQL goes through all rows to determine the count. Meaning that it does 10 - 40 billion (number of rows in the table * 10000) lookups in those 59 seconds.
Assume that SQL Server and Oracle create an index on the fly. If they do, it would be only 1 to 4 million.