This commit is contained in:
@@ -689,8 +689,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
|
||||
|
||||
|
||||
//PART INVENTORY
|
||||
|
||||
//PART INVENTORY
|
||||
|
||||
await ExecQueryAsync("CREATE TABLE apartinventory (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, description text null, " +
|
||||
"entrydate timestamp not null, lastentrydate timestamp null, partid bigint not null references apart, partwarehouseid bigint not null references apartwarehouse, " +
|
||||
"sourcetype integer not null, sourceid bigint not null, " +
|
||||
@@ -702,7 +702,10 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
"CONSTRAINT CHK_PartInventory_Valid_Dates_Sequence CHECK(lastentrydate < entrydate), " +
|
||||
"CONSTRAINT CHK_PartInventory_Valid_Previous_Columns CHECK((lastentrydate IS NULL AND lastbalance IS NULL) OR (lastentrydate IS NOT NULL AND lastbalance IS NOT NULL)) " +
|
||||
" )");
|
||||
await ExecQueryAsync("CREATE INDEX idx_aservicebank_objectid_objecttype ON aservicebank (objectid, objecttype );");
|
||||
//MIGRATE_OUTSTANDING: index(s) to support inventory ops
|
||||
//recheck this again once have full inventory in place and run some manual queries taken from inventory methods and issued by ef core
|
||||
//see what if any index tuning will help with a huge db of realistic data doing most common ops
|
||||
//await ExecQueryAsync("CREATE INDEX idx_PartInventory_SourceId_SourceType ON apartinventory (sourceid, sourcetype);");
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user