1
0
forked from s26450/hurtownia

add indexes on ft1

This commit is contained in:
Mariusz Sielski 2018-12-02 10:17:37 +01:00
parent f43b2bee80
commit f0db18d731
2 changed files with 33 additions and 1 deletions

View File

@ -82,7 +82,7 @@ CREATE TABLE FT1_Registration (
--claim status do uspójnienia z tabelą dim_status, wydaje mi się, że można by dodać przedrostek claim do kolumn, będzie czytelniej :)
claim_status_fk integer FOREIGN KEY REFERENCES dim_claim_statuses(claim_status_sk),
indication_fk integer FOREIGN KEY REFERENCES dim_indications(indication_sk),
claim_number integer,
claim_number NVARCHAR(50),
-- cnt jest tylko zliczeniowy, będzie miał 1, więc dałbym tinyint
cnt tinyint,
);

32
sql/indexes.sql Normal file
View File

@ -0,0 +1,32 @@
DROP INDEX IF EXISTS expected_response_time_fk_ft1_index ON FT1_Registration;
CREATE INDEX expected_response_time_fk_ft1_index ON FT1_Registration(expected_response_time_fk);
DROP INDEX IF EXISTS submission_date_fk_ft1_index ON FT1_Registration;
CREATE INDEX submission_date_fk_ft1_index ON FT1_Registration(submission_date_fk);
DROP INDEX IF EXISTS submission_date_fk_ft1_index ON FT1_Registration;
CREATE INDEX submission_date_fk_ft1_index ON FT1_Registration(submission_date_fk);
DROP INDEX IF EXISTS response_time_fk_ft1_index ON FT1_Registration;
CREATE INDEX response_time_fk_ft1_index ON FT1_Registration(response_time_fk);
DROP INDEX IF EXISTS drug_fk_ft1_index ON FT1_Registration;
CREATE INDEX drug_fk_ft1_index ON FT1_Registration(drug_fk);
DROP INDEX IF EXISTS factory_API_fk_ft1_index ON FT1_Registration;
CREATE INDEX factory_API_fk_ft1_index ON FT1_Registration(factory_API_fk);
DROP INDEX IF EXISTS factory_bulk_fk_ft1_index ON FT1_Registration;
CREATE INDEX factory_bulk_fk_ft1_index ON FT1_Registration(factory_bulk_fk);
DROP INDEX IF EXISTS factory_package_fk_ft1_index ON FT1_Registration;
CREATE INDEX factory_package_fk_ft1_index ON FT1_Registration(factory_package_fk);
DROP INDEX IF EXISTS country_fk_ft1_index ON FT1_Registration;
CREATE INDEX country_fk_ft1_index ON FT1_Registration(country_fk);
DROP INDEX IF EXISTS claim_status_fk_ft1_index ON FT1_Registration;
CREATE INDEX claim_status_fk_ft1_index ON FT1_Registration(claim_status_fk);
DROP INDEX IF EXISTS indication_fk_ft1_index ON FT1_Registration;
CREATE INDEX indication_fk_ft1_index ON FT1_Registration(indication_fk);