Skip to content

Commit fc11b3d

Browse files
vitess-bot[bot]arthurschreiber
authored andcommitted
[release-22.0] Fix: Improve VDiff internal query performance (vitessio#18579) (vitessio#18632)
Signed-off-by: Arthur Schreiber <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Arthur Schreiber <[email protected]>
1 parent 65547ff commit fc11b3d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

go/vt/sidecardb/schema/vdiff/vdiff_log.sql

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ limitations under the License.
1616

1717
CREATE TABLE IF NOT EXISTS vdiff_log
1818
(
19-
`id` int(11) NOT NULL AUTO_INCREMENT,
20-
`vdiff_id` int(11) NOT NULL,
21-
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
22-
`message` text NOT NULL,
23-
PRIMARY KEY (`id`)
19+
`id` bigint(20) NOT NULL AUTO_INCREMENT,
20+
`vdiff_id` bigint(20) NOT NULL,
21+
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
22+
`message` text NOT NULL,
23+
PRIMARY KEY (`id`),
24+
KEY `vdiff_id_idx` (`vdiff_id`)
2425
) ENGINE = InnoDB CHARSET = utf8mb4

go/vt/sidecardb/schema/vdiff/vdiff_table.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
CREATE TABLE IF NOT EXISTS vdiff_table
1818
(
19-
`vdiff_id` varchar(64) NOT NULL,
19+
`vdiff_id` bigint(20) NOT NULL,
2020
`table_name` varbinary(128) NOT NULL,
2121
`state` varbinary(64) DEFAULT NULL,
2222
`lastpk` varbinary(2000) DEFAULT NULL,

0 commit comments

Comments
 (0)