migrations: add index on units.path_id

An index is added to units.path_id to improve performance when joining
with the paths table.

Change-Id: I03410af9deef8fcac6ec5090876a07c8ba1d46d7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/267685
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Julie Qiu 2020-11-04 18:48:14 -05:00
Родитель d2f4c55c6c
Коммит cde56a3e58
2 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,9 @@
-- Copyright 2020 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
BEGIN;
DROP INDEX idx_units_path_id;
END;

Просмотреть файл

@ -0,0 +1,9 @@
-- Copyright 2020 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
BEGIN;
CREATE INDEX idx_units_path_id ON units(path_id);
END;