All Forums Database
l.k 75 posts Joined 10/08
09 Jul 2009
IN Clause limit in Teradata 12 (V2R12)...

Hi,Is there any limit for the IN clause literals in V2R12?RegardsKumar,Bangalore..

robpaller 159 posts Joined 05/09
10 Jul 2009

While there may not be a theoretical limit to the number of items contained within an IN clause you may see performance degradations if the list starts to exceed a few hundred items. There has been an optimizer tweak in place that tries to build a spool file when a large IN list is encountered, but I have seen mixed results with it working. Keep in mind it is possible to put a subquery in your IN list rather that a comma delimited list. If you have doubts, load the values into a volatile or global temporary table instead.

You must sign in to leave a comment.