diff --git a/database/init.sql b/database/init.sql index 7a4b539..39d71fe 100644 --- a/database/init.sql +++ b/database/init.sql @@ -14,6 +14,9 @@ create table if not exists slots ( sales_manager_id int not null references sales_managers(Id) ); +create index slots_manager_booked_start_date_idx on slots(sales_manager_id, booked, start_date); +create index slots_manager_booked_end_date_idx on slots(sales_manager_id, booked, end_date); + insert into sales_managers (name, languages, products, customer_ratings) values ('Seller 1', '{"German"}', '{"SolarPanels"}', '{"Bronze"}'); insert into sales_managers (name, languages, products, customer_ratings) values ('Seller 2', '{"German", "English"}', '{"SolarPanels", "Heatpumps"}', '{"Gold","Silver","Bronze"}'); insert into sales_managers (name, languages, products, customer_ratings) values ('Seller 3', '{"German", "English"}', '{"Heatpumps"}', '{"Gold","Silver","Bronze"}');