max is faster than count. thanks norman

This commit is contained in:
Nikos Kouremenos 2005-11-22 00:05:45 +00:00
parent 50af6160bf
commit e78f26908c
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ def visit(arg, dirname, filenames):
cur.execute('INSERT INTO jids (jid) VALUES (?)', (jid,))
con.commit()
cur.execute('SELECT COUNT(*) FROM jids')
cur.execute('SELECT MAX(jid) FROM jids')
JID_ID = cur.fetchone()[0]
f = open(path_to_text_file, 'r')