You are pretty much entitled to it. If nothing has been prepared or planned in advance (i.e. indexes or data previously prepared or cached earlier), then yes, all the data that needs to be taken into account to form the proper order should be read, and if the amount of data needs to be worked out, not can fit in available / allocated memory, then it will be necessary to perform disk caching.
This is a non-trivial performance issue, and each RDBMS will have smart ways to address and optimize it so that you use your product, and not that flabby โBrand Xโ with a knockout.
source share