Skip to content

Commit

Permalink
Schema migration of QInfo to eliminate the problematic index
Browse files Browse the repository at this point in the history
  • Loading branch information
iagaponenko committed Aug 1, 2023
1 parent 655206f commit 7344288
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/qmeta/QMetaMysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ using namespace std;
namespace {

// Current version of QMeta schema
char const VERSION_STR[] = "8";
char const VERSION_STR[] = "9";

LOG_LOGGER _log = LOG_GET("lsst.qserv.qmeta.QMetaMysql");

Expand Down
2 changes: 2 additions & 0 deletions src/qmeta/schema/migrate-8-to-9.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- This index had significant performance implications for Qserv.
DROP INDEX IF EXISTS `QInfo_query_index` ON `QInfo`;
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ CREATE TABLE IF NOT EXISTS `QInfo` (
KEY `QInfo_completed_index` (`completed`),
KEY `QInfo_returned_index` (`returned`),
KEY `QInfo_qtype_index` (`qType`),
FULLTEXT KEY `QInfo_query_index` (`query`),
CONSTRAINT `QInfo_cid`
FOREIGN KEY (`czarId`)
REFERENCES `QCzar` (`czarId`)
Expand Down Expand Up @@ -219,4 +218,5 @@ COMMENT = 'Table of messages generated during queries.';
-- Version 6 added indexes to optimize queries made by the Qserv Web Dashboard.
-- Version 7 added final row count to QInfo.
-- Version 8 replaced INT with BIGINT in the byte and row counter columns of QInfo.
INSERT INTO `QMetadata` (`metakey`, `value`) VALUES ('version', '8');
-- Version 9 removed the full-text index on the query text from QInfo.
INSERT INTO `QMetadata` (`metakey`, `value`) VALUES ('version', '9');

0 comments on commit 7344288

Please sign in to comment.