- Patch #131934 by Gerhard: removed useless indices.
parent
9e94bb6101
commit
8018fe942d
|
@ -485,10 +485,7 @@ function system_install() {
|
|||
totalcount bigint unsigned NOT NULL default '0',
|
||||
daycount mediumint unsigned NOT NULL default '0',
|
||||
timestamp int unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (nid),
|
||||
KEY totalcount (totalcount),
|
||||
KEY daycount (daycount),
|
||||
KEY timestamp (timestamp)
|
||||
PRIMARY KEY (nid)
|
||||
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
|
||||
|
||||
db_query("CREATE TABLE {system} (
|
||||
|
@ -976,9 +973,6 @@ function system_install() {
|
|||
timestamp int_unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (nid)
|
||||
)");
|
||||
db_query("CREATE INDEX {node_counter}_totalcount_idx ON {node_counter} (totalcount)");
|
||||
db_query("CREATE INDEX {node_counter}_daycount_idx ON {node_counter} (daycount)");
|
||||
db_query("CREATE INDEX {node_counter}_timestamp_idx ON {node_counter} (timestamp)");
|
||||
|
||||
db_query("CREATE TABLE {system} (
|
||||
filename varchar(255) NOT NULL default '',
|
||||
|
@ -3708,6 +3702,27 @@ function system_update_2005() {
|
|||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop useless indices on node_counter table.
|
||||
*/
|
||||
function system_update_2006() {
|
||||
$ret = array();
|
||||
switch ($GLOBALS['db_type']) {
|
||||
case 'pgsql':
|
||||
$ret[] = update_sql('DROP INDEX {node_counter}_daycount_idx');
|
||||
$ret[] = update_sql('DROP INDEX {node_counter}_totalcount_idx');
|
||||
$ret[] = update_sql('DROP INDEX {node_counter}_timestamp_idx');
|
||||
break;
|
||||
case 'mysql':
|
||||
case 'mysqli':
|
||||
$ret[] = update_sql("ALTER TABLE {node_counter} DROP INDEX daycount");
|
||||
$ret[] = update_sql("ALTER TABLE {node_counter} DROP INDEX totalcount");
|
||||
$ret[] = update_sql("ALTER TABLE {node_counter} DROP INDEX timestamp");
|
||||
break;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "defgroup updates-5.0-to-x.x"
|
||||
* The next series of updates should start at 3000.
|
||||
|
|
Loading…
Reference in New Issue