mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 03:48:13 +02:00

This was to remove a performance regression between 10.3 and 10.4 In 10.5 we will have a better implementation of records_in_range that will enable us to get more statistics. This change was not done in 10.4 because the 10.5 will be part of a larger change that is not suitable for the GA 10.4 version Other things: - Changed default handler block_size to 8192 to fix things statistics for engines that doesn't set the block size. - Fixed a bug in spider when using multiple part const ranges (Patch from Kentoku)
43 lines
1.6 KiB
Text
43 lines
1.6 KiB
Text
connect con1,localhost,root,,test;
|
|
CREATE TABLE `db_history` (
|
|
`version` VARCHAR(10) NOT NULL,
|
|
`updateJSON` MEDIUMTEXT,
|
|
`prevVersion` VARCHAR(10) NOT NULL,
|
|
`nodeID` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
|
|
`prevNodeID` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
|
|
PRIMARY KEY (`prevNodeID`,`nodeID`),
|
|
KEY `version` (`version`) USING BTREE,
|
|
KEY `prevVersion` (`prevVersion`) USING BTREE,
|
|
KEY `nodeID` (`nodeID`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
INSERT INTO `db_history` VALUES
|
|
('0.0.1','{}','0.0.0',1,0),
|
|
('0.0.2','{\"data\":{\"add\":{},\"update\":{},\"delete\":{}}}','0.0.1',2,1),
|
|
('0.0.3','{\"data\":{\"add\":{},\"update\":{},\"delete\":{}}}','0.0.2',3,2);
|
|
CREATE TABLE IF NOT EXISTS version_history (
|
|
latch VARCHAR(32) NULL,
|
|
origid BIGINT UNSIGNED NULL,
|
|
destid BIGINT UNSIGNED NULL,
|
|
weight DOUBLE NULL,
|
|
seq BIGINT UNSIGNED NULL,
|
|
linkid BIGINT UNSIGNED NULL,
|
|
KEY (latch, origid, destid) USING HASH,
|
|
KEY (latch, destid, origid) USING HASH
|
|
) ENGINE=OQGRAPH DATA_TABLE='db_history' ORIGID='prevNodeID' DESTID='nodeID';
|
|
SELECT `db`.`version`, `db`.`nodeID`
|
|
FROM `version_history` AS `v` INNER JOIN `db_history` AS `db` ON `db`.`nodeID` = `v`.`linkid`
|
|
WHERE `latch` = 'breadth_first' AND `origid` = '1' ORDER BY `weight` DESC LIMIT 1;
|
|
version nodeID
|
|
0.0.3 3
|
|
disconnect con1;
|
|
connect con2,localhost,root,,test;
|
|
SELECT `db`.`version`, `db`.`nodeID`
|
|
FROM `version_history` AS `v` INNER JOIN `db_history` AS `db` ON `db`.`nodeID` = `v`.`linkid`
|
|
WHERE `latch` = 'breadth_first' AND `origid` = '1' ORDER BY `weight` DESC LIMIT 1;
|
|
version nodeID
|
|
0.0.3 3
|
|
disconnect con2;
|
|
connect con3,localhost,root,,test;
|
|
DROP TABLE version_history;
|
|
DROP TABLE db_history;
|
|
disconnect con3;
|