-
Notifications
You must be signed in to change notification settings - Fork 4
Why limit the number of selected columns
Selected columns that you don't need can impact performances, particularly when you select all columns.
Not selected evertyting can save memory on database and JVM sides and reduce IO between the JVM and the database.
In addition, unwanted columns can prevent some index-only scans that avoid table access, and so saves a lot of IO. This can seriously degrade performances.
So, when you need some specific read-only data, as it could be the case with DTOs, it is recommended to project the needed columns. Examples can be found here or here to do this with JPA, Hibernate or Spring.
π Β Core
π Β JVM
π Β SQL
π Β Scopes
π Β Create an annotation
π Β JUnit 4
π Β JUnit 5
π Β TestNG
π Β Spring
π Β Detect and fix N+1 SELECT
π Β Maven performance
π Β Spring Boot - JUnit 4
π Β Spring Boot - JUnit 5
π Β Micronaut Data - JUnit 5
π Β Micronaut - Spring - JUnit 5
π Β Quarkus - JUnit 5
π Β FAQ
π Β QuickPerf code