migrations: add documentation indexes

Indexes are added to new_documentation and documentation_symbols for
columns that are frequently accessed with a WHERE clause.

Change-Id: I8be193b039d8d519492e284b0b7dd29a2fb5532a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303449
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>
diff --git a/migrations/000085_add_documentation_index.down.sql b/migrations/000085_add_documentation_index.down.sql
new file mode 100644
index 0000000..fac5bc3
--- /dev/null
+++ b/migrations/000085_add_documentation_index.down.sql
@@ -0,0 +1,11 @@
+-- Copyright 2021 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_documentation_symbols_documentation_id;
+DROP INDEX idx_documentation_goos;
+DROP INDEX idx_documentation_goarch;
+
+END;
diff --git a/migrations/000085_add_documentation_index.up.sql b/migrations/000085_add_documentation_index.up.sql
new file mode 100644
index 0000000..41d429b
--- /dev/null
+++ b/migrations/000085_add_documentation_index.up.sql
@@ -0,0 +1,12 @@
+-- Copyright 2021 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_documentation_symbols_documentation_id
+    ON documentation_symbols(documentation_id);
+CREATE INDEX idx_documentation_goos ON new_documentation(goos);
+CREATE INDEX idx_documentation_goarch ON new_documentation(goarch);
+
+END;