On Fri, May 7, 2010 at 9:02 AM, Magnus Hagander <magnus@xxxxxxxxxxxx> wrote: > Try doing a binary search with LIMIT. E.g., if you have 20M reecords, > do a SELECT * FROM ... LIMIT 10M. (throw away the results) If that > broke, check the upper half, if not, check the lower one (with > OFFSET). > > If you have a serial primary key or something, you can use WHERE on it > which will likely be a lot faster than using LIMIT, but the same idea > applies - do a binary search. Should take a lot less than days, and is > reasonably easy to script. That's my next step if I can't find a quicker/simpler method. My math tells me that my current script is going to take 24 days to test every record. Obviously, there are ways I can speed that up if I have no choice but I'm hoping for a simpler solution. I'd prefer to run a COPY TABLE like command and have it skip the bad records. Thanks, Bryan -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general