Browse code

introduced a new index to aliases, that greatly speeds up missed calls webpage

Jiri Kuthan authored on 04/11/2003 00:21:58
Showing 1 changed files
... ...
@@ -284,6 +284,7 @@ CREATE TABLE active_sessions (
284 284
 
285 285
 #
286 286
 # Table structure for table 'aliases' -- location-like table
287
+# (aliases_contact index makes lookup of missed calls much faster)
287 288
 #
288 289
 
289 290
 CREATE TABLE aliases (
... ...
@@ -298,7 +299,8 @@ CREATE TABLE aliases (
298 299
   replicate int(10) unsigned NOT NULL default '0',
299 300
   state tinyint(1) unsigned NOT NULL default '0',
300 301
   flags int(11) NOT NULL default '0',
301
-  PRIMARY KEY($USERCOL, domain, contact)
302
+  PRIMARY KEY($USERCOL, domain, contact),
303
+  INDEX aliases_contact (contact)
302 304
 ) $TABLE_TYPE;
303 305
 
304 306