Now, anyone want to try creating the dummy table to compare against? select rownum from ( select null from dual connect by level <= power(2,32)) _____ From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Connor McDonald Sent: Thursday, May 20, 2010 11:08 AM To: Oracle Freelist Subject: Re: Searching missing number in large data. Uncompiled / untested / etc... declare type t is table of pls_integer index by pls_integer; d t; begin for i in ( select idx from my_table ) loop d(i.idx) := 1; end loop;