Are arrays optimized in jOOQ & PostgreSQL?

前端 未结 1 364
南笙
南笙 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<Integer[]> array = DSL.val(values);
    DSL.any(array);
    
    0 讨论(0)
提交回复
热议问题