We are using H2 db version 2.1.210 in in-memory mode and trying to fetch the data from large table. The query is looks below format. We have 4424 arguments in IN clause. ** select * from \"Policy\" policy0_ where policy0_.headEndUuid in (?, ?...) or policy0_.tailEndUuid in (? , ?...) order by policy0_.policyName asc, policy0_.lastUpdate asc limit ? {1: 'id1', : : 4425:50 }; ** We are using Spring JPA to fetch the data with using spring filter Specification.
Currently this table has total 19997 rows and trying to filter the rows based on the WHERE and IN clause and fetching 50 rows using pagination. Select query taking 20 sec to return the result. Attached the sql trace for reference. *Kindly provide your suggestion to improve the SELECT query execution performance.* Thanks in Advance !!! -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/8c0afc34-427d-49cb-a331-7905ee301527n%40googlegroups.com.