Each database usually comes with some level of caching. By caching the result of the last queries executed, the database can provide the data previously cached immediately. This way, for the period of time that the desired cached data is valid, the database can avoid executing queries. Hibernate first level cache is an example of database caching.