This commit is contained in:
2018-10-03 00:39:36 +00:00
parent 6c272662ed
commit 896521fbed
7 changed files with 245 additions and 80 deletions

View File

@@ -23,7 +23,7 @@ namespace AyaNova.Util
private const int DESIRED_SCHEMA_LEVEL = 9;
internal const long EXPECTED_COLUMN_COUNT = 99;
internal const long EXPECTED_INDEX_COUNT = 24;
internal const long EXPECTED_INDEX_COUNT = 22;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
/////////////////////////////////////////////////////////////////
@@ -192,9 +192,9 @@ namespace AyaNova.Util
exec("CREATE TABLE awidget (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, " +
"startdate timestamp, enddate timestamp, dollaramount decimal(19,5), active bool, roles int4, notes text)");
//TESTING INDEXES ONLY ############################
exec("CREATE INDEX widget_idx_test_name_id2 ON public.awidget USING btree (name COLLATE pg_catalog.\"default\", id) TABLESPACE pg_default;");
exec("CREATE UNIQUE INDEX widget_idx_name_id ON public.awidget USING btree (id, name COLLATE pg_catalog.\"default\") TABLESPACE pg_default;");
//PERF TESTING INDEX ############################
//Weirdly, it's always slower when it uses the index?? memory issue maybe?
exec("CREATE UNIQUE INDEX widget_idx_name_id ON public.awidget USING btree (id, name COLLATE pg_catalog.\"default\") TABLESPACE pg_default;");
setSchemaLevel(++currentSchema);
}