这是我的查询:select * from dbname where user_name = any(cast(? as text[]))
我的conf文件:
max_connections = 100
shared_buffers = 1GB
effective_cache_size = 3GB
maintenance_work_mem = 256MB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 4
effective_io_concurrency = 2
work_mem = 300MB
min_wal_size = 512MB
max_wal_size = 2GB
当我放少于15000时,一切正常。
Postgresq 9.5。
答案 0 :(得分:0)
不确定Hibernate是否可行,但是您可以尝试加入连接:
select t.*
from tablename t
join unnest(cast(? as text[])) as x(name) on t.user_name = x.name