Moving the index creation commands into a readme file due to the fact that creating of these indexes is really slow.
This commit is contained in:
parent
fc27edb6d7
commit
dc416e5887
|
@ -0,0 +1,5 @@
|
||||||
|
Site speed can be improved when the following indexes are set. They cannot be set through the update script because on large sites they will block the site for several minutes.
|
||||||
|
|
||||||
|
CREATE INDEX `uid_commented` ON `item` (`uid`, `commented`);
|
||||||
|
CREATE INDEX `uid_created` ON `item` (`uid`, `created`);
|
||||||
|
CREATE INDEX `uid_unseen` ON `item` (`uid`, `unseen`);
|
15
update.php
15
update.php
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1154 );
|
define( 'UPDATE_VERSION' , 1153 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -1336,16 +1336,3 @@ function update_1152() {
|
||||||
return UPDATE_FAILED;
|
return UPDATE_FAILED;
|
||||||
return UPDATE_SUCCESS;
|
return UPDATE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_1153() {
|
|
||||||
$r = q("CREATE INDEX `uid_commented` ON `item` (`uid`, `commented`)");
|
|
||||||
if(! $r)
|
|
||||||
return UPDATE_FAILED;
|
|
||||||
$r = q("CREATE INDEX `uid_created` ON `item` (`uid`, `created`)");
|
|
||||||
if(! $r)
|
|
||||||
return UPDATE_FAILED;
|
|
||||||
$r = q("CREATE INDEX `uid_unseen` ON `item` (`uid`, `unseen`)");
|
|
||||||
if(! $r)
|
|
||||||
return UPDATE_FAILED;
|
|
||||||
return UPDATE_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user