Speed improvements in the database
This commit is contained in:
parent
222635d15a
commit
69b883829a
|
@ -569,6 +569,8 @@ CREATE TABLE IF NOT EXISTS `item` (
|
|||
KEY `moderated` (`moderated`),
|
||||
KEY `spam` (`spam`),
|
||||
KEY `author-name` (`author-name`),
|
||||
KEY `uid_commented` (`uid`, `commented`),
|
||||
KEY `uid_created` (`uid`, `created`),
|
||||
FULLTEXT KEY `title` (`title`),
|
||||
FULLTEXT KEY `body` (`body`),
|
||||
FULLTEXT KEY `allow_cid` (`allow_cid`),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1153 );
|
||||
define( 'UPDATE_VERSION' , 1154 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1337,3 +1337,9 @@ function update_1152() {
|
|||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
function update_1153() {
|
||||
$r = q("CREATE INDEX `uid_commented` ON `item` (`uid`, `commented`); CREATE INDEX `uid_created` ON `item` (`uid`, `created`)");
|
||||
if(! $r)
|
||||
return UPDATE_FAILED;
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue