Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: go/src/infra/crimson/sql/schema.sql

Issue 2113523005: Crimson: Added SQL indexes (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@crimson-add-host
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/crimson/sql/schema.sql
diff --git a/go/src/infra/crimson/sql/schema.sql b/go/src/infra/crimson/sql/schema.sql
index 83474c0b6770e5a60386f460499603b20fadc541..d76dcdbb3cb5bf419ce5ca8ee9e81c75aac03027 100644
--- a/go/src/infra/crimson/sql/schema.sql
+++ b/go/src/infra/crimson/sql/schema.sql
@@ -13,6 +13,9 @@ CREATE TABLE ip_range (
end_ip varchar(34) NOT NULL
) ENGINE=INNODB;
+CREATE index ip_range_start_ip_idx ON ip_range(start_ip);
sheyang 2016/07/01 21:55:26 The purpose of index start_ip and end_ip is for qu
pgervais 2016/07/01 22:26:36 That's correct.
+CREATE index ip_ragne_start_ip_idx ON ip_range(end_ip);
+
CREATE TABLE host (
site varchar(20) NOT NULL,
sheyang 2016/07/01 21:55:26 Is this a FK?
pgervais 2016/07/01 22:26:36 It looks like a foreign key but it's not. There is
hostname varchar(63) NOT NULL,
@@ -21,3 +24,6 @@ CREATE TABLE host (
boot_class varchar(20),
PRIMARY KEY (mac_addr)
) ENGINE=INNODB;
+
+CREATE index host_site_hostname_idx ON host(site, hostname);
+CREATE index host_site_ip_idx ON host(site, ip);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698