mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #1272 add index on images.path to speed up i.php
This commit is contained in:
24
install/db/159-database.php
Normal file
24
install/db/159-database.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This file is part of Piwigo. |
|
||||
// | |
|
||||
// | For copyright and license information, please view the COPYING.txt |
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined('PHPWG_ROOT_PATH'))
|
||||
{
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
|
||||
$upgrade_description = 'add index on images.path';
|
||||
|
||||
$query = '
|
||||
ALTER TABLE '. IMAGES_TABLE .'
|
||||
ADD INDEX `images_i7` (`path`)
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
echo "\n".$upgrade_description."\n";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user