explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sf9k

Settings
# exclusive inclusive rows x rows loops node
1. 0.073 84.379 ↓ 1.7 85 1

Sort (cost=62,164.55..62,164.67 rows=50 width=450) (actual time=84.372..84.379 rows=85 loops=1)

  • Sort Key: color.priority
  • Sort Method: quicksort Memory: 68kB
2. 0.047 84.306 ↓ 1.7 85 1

Hash Join (cost=62,104.90..62,163.14 rows=50 width=450) (actual time=84.103..84.306 rows=85 loops=1)

  • Hash Cond: ("DrugFormDrugFormInteraction"."Color" = color.id)
3. 0.094 84.246 ↓ 1.7 85 1

Hash Join (cost=62,103.75..62,161.77 rows=50 width=276) (actual time=84.083..84.246 rows=85 loops=1)

  • Hash Cond: (product.drug_form_id = "DrugFormDrugFormInteraction"."DrugForm")
4. 0.124 0.124 ↑ 1.0 26 1

Index Scan using mprdat_product_id_index on medicine_product_all product (cost=0.29..56.64 rows=26 width=78) (actual time=0.010..0.124 rows=26 loops=1)

  • Index Cond: (product_id = ANY ('{900,904,1350,1400,2305,2311,2967,3024,3266,3433,5748,6561,7481,7513,8174,10122,10597,12103,13863,14571,14591,15266,16237,16474,20648,21716}'::integer[]))
5. 21.486 84.028 ↓ 1.6 49,344 1

Hash (cost=61,727.63..61,727.63 rows=30,066 width=206) (actual time=84.028..84.028 rows=49,344 loops=1)

  • Buckets: 65536 (originally 32768) Batches: 1 (originally 1) Memory Usage: 11891kB
6. 15.460 62.542 ↓ 1.6 49,344 1

Nested Loop (cost=0.72..61,727.63 rows=30,066 width=206) (actual time=0.024..62.542 rows=49,344 loops=1)

7. 0.126 0.126 ↑ 1.0 26 1

Index Scan using mprdat_product_id_index on medicine_product_all affecting_product (cost=0.29..56.64 rows=26 width=78) (actual time=0.005..0.126 rows=26 loops=1)

  • Index Cond: (product_id = ANY ('{900,904,1350,1400,2305,2311,2967,3024,3266,3433,5748,6561,7481,7513,8174,10122,10597,12103,13863,14571,14591,15266,16237,16474,20648,21716}'::integer[]))
8. 46.956 46.956 ↑ 1.2 1,898 26

Index Scan using interaction1affectingdrugform on "DrugForm_DrugFormDrugFormInteraction" "DrugFormDrugFormInteraction" (cost=0.44..2,349.45 rows=2,251 width=136) (actual time=0.010..1.806 rows=1,898 loops=26)

  • Index Cond: ("AffectingDrugForm" = affecting_product.drug_form_id)
9. 0.005 0.013 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=178) (actual time=0.013..0.013 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.008 0.008 ↑ 1.0 7 1

Seq Scan on general_color color (cost=0.00..1.07 rows=7 width=178) (actual time=0.006..0.008 rows=7 loops=1)

Planning time : 1.095 ms
Execution time : 84.481 ms