The count query that is executed after the retrieval of entities still uses order by. For rather large result sets the database may need a lot of memory to apply the sorting or even may generate huge temporary files. Generating temporary files is a performance killer on cloud hardware. Since sorting is not required for count queries and performance improvements are always nice removal of order by is the only resolution to fix this.
The count query that is executed after the retrieval of entities still uses order by. For rather large result sets the database may need a lot of memory to apply the sorting or even may generate huge temporary files. Generating temporary files is a performance killer on cloud hardware. Since sorting is not required for count queries and performance improvements are always nice removal of order by is the only resolution to fix this.