Authored by Tracy Harton

Add INDEX for zLastUsed for performance

@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
37 { 37 {
38 // [db executeUpdate:@"DROP TABLE ZCACHE"]; 38 // [db executeUpdate:@"DROP TABLE ZCACHE"];
39 [db executeUpdate:@"CREATE TABLE IF NOT EXISTS ZCACHE (ztileHash INTEGER PRIMARY KEY, zlastUsed DOUBLE, zdata BLOB)"]; 39 [db executeUpdate:@"CREATE TABLE IF NOT EXISTS ZCACHE (ztileHash INTEGER PRIMARY KEY, zlastUsed DOUBLE, zdata BLOB)"];
  40 + [db executeUpdate:@"CREATE INDEX zlastUsedIndex ON ZCACHE(zLastUsed)"];
40 } 41 }
41 42
42 -(id) initWithDatabase: (NSString*)path 43 -(id) initWithDatabase: (NSString*)path