CREATE INDEX i_suppliers_establish_id ON suppliers(establish_id);
CREATE INDEX i_suppliers_supplier_id ON suppliers(supplier_id);  

CREATE INDEX i_individuls_household_id ON individuals(household_id); 
CREATE INDEX i_individuls_bank_id1 ON individuals(bank_id_1); 
CREATE INDEX i_individuls_establish_id ON individuals(establish_id); 
create index i_individuals_ent on individuals(entrepreneur) where entrepreneur = 2;
create index i_individuals_dec on individuals(status_civil) where status_civil = 99;

CREATE INDEX i_properties_sold_price ON properties(prop_to_be_sold, prop_price); 

CREATE INDEX i_firm_sector_firm ON firm_sector(firm_id); 
CREATE INDEX i_firm_owner_individual ON firm_owner(individual_id); 

CREATE INDEX i_consumers_household ON consumers(household_id); 
CREATE INDEX i_consumers_supplier ON consumers(supplier_id); 

CREATE INDEX i_establishments_firm ON establishments(firm_id); 
CREATE INDEX i_establishments_bank ON establishments(bank_q_buy_est_id); 
CREATE INDEX i_establishments_spatial1 ON establishments(spatial_code_1); 
CREATE INDEX i_establishments_spatial2 ON establishments(spatial_code_2); 
CREATE INDEX i_establishments_spatial3 ON establishments(spatial_code_3); 
CREATE INDEX i_establishments_spatial4 ON establishments(spatial_code_4); 

CREATE INDEX i_household_prop2 ON households(property_id_2) where property_id_2 is null;
CREATE INDEX i_propertyowner_household on property_owner(household_id);

