View Single Post

   
  #1 (permalink)  
Old 05-07-2008, 10:16 AM
Steve Ackman
 
Posts: n/a
Default How to find holes in a sequence?

I've got a leafnode directory with usenet articles
named, roughly, 1-79389.

After running a sh script on the directory to populate a
table with various headers and the full article, I have,

mysql> select count(*) from rcm;
+----------+
| count(*) |
+----------+
| 79303 |
+----------+
1 row in set (0.00 sec)

and an actual article count on the directory of 79347.

Obviously, there are 44 articles that for some
reason or other, failed the INSERT (and an additional
42 that don't exist as filenames). Given that
server_id (mediumint) is assigned the filename of the
article, how can I find which numbers between 1 and
79389 *don't* exist as server_id?
Reply With Quote