Are arrays optimized in jOOQ & PostgreSQL?

前端 未结 1 366
南笙
南笙 2021-01-16 11:07

I have a large list of identifiers which I would like to add to the WHERE clause like this:

identifier IN (..., ..., ..., ...)

1条回答
  •  被撕碎了的回忆
    2021-01-16 11:23

    Replace:

    DSL.any(DSL.array(values));
    

    With:

    DSL.any(values);
    

    To create a single bind variable.

    Alternatively, you could create that bind variable explicitly:

    Field array = DSL.val(values);
    DSL.any(array);
    

    0 讨论(0)
提交回复
热议问题