IN clause limit with databases – Oracle DB2

By | November 23, 2016

Few solutions read for ORACLE were,

  • No issue if IN clause values comes from a sub-query  – no limit
  • Storing the IN clause values in global temporary table and using them
  • Using ORs in between 1000s of INs – performance impact
  • http://www.orafaq.com/forum/t/41437/0/
  • https://community.oracle.com/thread/235143

Postgresql doesn’t have any limit:

  • http://stackoverflow.com/questions/1009706/postgresql-max-number-of-parameters-in-in-clause

SQL Server has higher limit: (closer to 250 MB size)

  • http://stackoverflow.com/questions/1069415/limit-on-the-where-col-in-condition

DB2 limit to 2 MB or 250 k terms

  • http://stackoverflow.com/questions/25599900/what-is-the-upper-limit-for-the-predicate-where-in-db2

Leave a Reply

Your email address will not be published. Required fields are marked *