Hi Shyam, PostgreSQL has a limit of 32767 bind variables per statement. In all jOOQ versions, you can explicitly inline your bind variables to prevent running into this limit. See also this section of the manual. https://www.jooq.org/doc/latest/manual/sql-building/bind-values/inlined-parameters/
jOOQ 3.9.0 fixes this issue by auto-inlining your bind variables, if you run beyond that limit: https://github.com/jOOQ/jOOQ/issues/5701 Hope this helps, Lukas 2017-01-12 13:21 GMT+01:00 Shyam <[email protected]>: > Hi there, > > I am in JOOQ v 3.7.3. > > In my usage, I am trying to fetch records with ids matching those ids in > my collection. > The collection has around 35293 items which is out of range for an > Integer2. Hence it throws an IOException. > The code would look like below, > > final Set<Long> idValues = ...; // set of 35293 long values > dslContext.selectFrom(TEST_DIMENSION).where(TEST_DIMENSION.ID.in > (idValues)) > .fetch().intoMap(TEST_DIMENSION.ID, TEST_DIMENSION.DID); > > To avoid this exception I am left with option of breaking up idValues in > to partial set and execute query for each partial set. > > Why is that where - in implementation limits the collection size to > Integer2 ? > What is the recommended way to use where - in when I have large collection > like this? > > Thanks in advance. > > -- > Shyam > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
