From e78f26908c864e23cb41dac6f0f5f4155327fb3e Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Tue, 22 Nov 2005 00:05:45 +0000 Subject: [PATCH] max is faster than count. thanks norman --- scripts/migrate_logs_to_dot9_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/migrate_logs_to_dot9_db.py b/scripts/migrate_logs_to_dot9_db.py index b22053ecc..fbb2dee17 100755 --- a/scripts/migrate_logs_to_dot9_db.py +++ b/scripts/migrate_logs_to_dot9_db.py @@ -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')