This is right.
You should never load data without, at the very least, pagination. That is, without restricting the volume of data returned. You should also restrict the fields returned if only a subset of data is required, and apply filter criteria where possible. And use COUNT to check total results.
It seems irresponsible to simply allow your code to return all rows without any limiting. It falls into the same category as not validating or sanitizing user data from forms: you're just asking for trouble and unexpected conditions that crash your code.