20240226_step3.sql 528 B

123456789101112
  1. explain
  2. select * from public.measurment_input_params as t1
  3. inner join public.measurment_baths as t2 on t1.id = t2.measurment_input_param_id
  4. inner join public.employees as t3 on t3.id = t2.emploee_id
  5. where
  6. t2.emploee_id = 10
  7. -- -> Seq Scan on measurment_baths t2 (cost=0.00..472.51 rows=500 width=20)
  8. create index ix_measurment_baths_emploee_id on measurment_baths(emploee_id)
  9. -- -> Index Scan using ix_measurment_baths_emploee_id on measurment_baths t2 (cost=0.29..20.04 rows=500 width=20)