"Gurjeet Singh" <singh.gurjeet@xxxxxxxxx> writes: > But I do not understand why the IN list has to make so many recursive > calls??? Existing releases effectively expand "foo IN (1,2,3,...)" to "(((foo = 1) OR foo = 2) OR foo = 3) ..." which can be a deeply nested OR structure. IIRC this is changed in 8.2. regards, tom lane