Skip to content
Permalink
Browse files

PR-466 Improve oxseo::OXOBJECTID index to fit current queries

Related #466
  • Loading branch information
Sieg committed Oct 7, 2019
1 parent 2f65190 commit a1883b7f772e6dba6064ab5b4603b332727bb559
Showing with 27 additions and 1 deletion.
  1. +1 −1 source/Setup/Sql/database_schema.sql
  2. +26 −0 source/migration/data/Version20191007144155.php
@@ -1360,7 +1360,7 @@ CREATE TABLE `oxseo` (
`OXTIMESTAMP` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP COMMENT 'Timestamp',
PRIMARY KEY (`OXIDENT`, `OXSHOPID`, `OXLANG`),
UNIQUE KEY search (`OXTYPE`, `OXOBJECTID`, `OXSHOPID`, `OXLANG`,`OXPARAMS`),
KEY `OXOBJECTID` (`OXLANG`,`OXOBJECTID`,`OXSHOPID`),
KEY `OXOBJECTID` (`OXOBJECTID`,`OXSHOPID`, `OXLANG`),
KEY `SEARCHSTD` (OXSTDURL(100),`OXSHOPID`),
KEY `SEARCHSEO` (OXSEOURL(100))
) ENGINE=InnoDB COMMENT 'Seo urls information';
@@ -0,0 +1,26 @@
<?php declare(strict_types=1);
namespace OxidEsales\EshopCommunity\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20191007144155 extends AbstractMigration
{
public function up(Schema $schema) : void
{
$query = "ALTER TABLE oxseo
DROP INDEX `OXOBJECTID`,
ADD INDEX `OXOBJECTID` (`OXOBJECTID`,`OXSHOPID`,`OXLANG`)";
$this->addSql($query);
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
}
}

0 comments on commit a1883b7

Please sign in to comment.
You can’t perform that action at this time.