PostgreSQL work_mem with spring framework
It's possible to increase work_mem for one special query which is implemented with Spring Framework?
My repository class is:
@Repository
public interface AccountSpringRepository extends JpaRepository<Account, Long> {
...
@Query(value = "SELECT DISTINCT a FROM Account a here_is_the_query> now())")
List<Account> findAccountByStatus(
@Param("status") List<EnumStatusType> status,
Pageable limit);
}
It's possible and how to increase work_mem for the given query?
SET work_mem = '256MB';
Regards, Rafal
@Query(value = "set work_mem = '128MB'; SELECT DISTINCT a FROM Account a here_is_the_query> now())")