explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1jtX

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 0.323 ↑ 1.5 2 1

Nested Loop Left Join (cost=33.85..36.57 rows=3 width=558) (actual time=0.305..0.323 rows=2 loops=1)

  • Join Filter: ((igt.item_group_type_id)::text = (ig.item_group_type_id)::text)
  • Rows Removed by Join Filter: 2
2. 0.026 0.299 ↑ 1.5 2 1

Hash Right Join (cost=33.85..35.52 rows=3 width=409) (actual time=0.294..0.299 rows=2 loops=1)

  • Hash Cond: (ig2.item_group_id = isg2.item_group_id)
3. 0.006 0.006 ↑ 1.0 46 1

Seq Scan on item_groups ig2 (cost=0.00..1.46 rows=46 width=19) (actual time=0.003..0.006 rows=46 loops=1)

4. 0.002 0.267 ↑ 1.5 2 1

Hash (cost=33.82..33.82 rows=3 width=401) (actual time=0.267..0.267 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
5. 0.030 0.265 ↑ 1.5 2 1

Hash Right Join (cost=32.15..33.82 rows=3 width=401) (actual time=0.260..0.265 rows=2 loops=1)

  • Hash Cond: (ig1.item_group_id = isg1.item_group_id)
6. 0.007 0.007 ↑ 1.0 46 1

Seq Scan on item_groups ig1 (cost=0.00..1.46 rows=46 width=19) (actual time=0.003..0.007 rows=46 loops=1)

7. 0.003 0.228 ↑ 1.5 2 1

Hash (cost=32.12..32.12 rows=3 width=393) (actual time=0.228..0.228 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
8. 0.003 0.225 ↑ 1.5 2 1

Nested Loop Left Join (cost=19.89..32.12 rows=3 width=393) (actual time=0.208..0.225 rows=2 loops=1)

  • Join Filter: (sdt.medicine_id = sisg.medicine_id)
9. 0.005 0.134 ↑ 1.0 1 1

Nested Loop Left Join (cost=4.29..14.81 rows=1 width=256) (actual time=0.122..0.134 rows=1 loops=1)

  • Join Filter: (sdt.medicine_id = stisg.item_id)
10. 0.008 0.081 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.28..11.56 rows=1 width=130) (actual time=0.076..0.081 rows=1 loops=1)

  • Join Filter: (sdt.medicine_id = sstisg.item_id)
11. 0.016 0.016 ↑ 1.0 1 1

Index Only Scan using store_item_mas_indx on store_item_details sdt (cost=0.28..8.30 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: (medicine_id = 3941)
  • Heap Fetches: 1
12. 0.021 0.057 ↑ 1.0 1 1

Hash Right Join (cost=2.00..3.25 rows=1 width=130) (actual time=0.053..0.057 rows=1 loops=1)

  • Hash Cond: (isg2.item_subgroup_id = sstisg.item_subgroup_id)
13. 0.004 0.004 ↑ 1.0 17 1

Seq Scan on item_sub_groups isg2 (cost=0.00..1.17 rows=17 width=126) (actual time=0.003..0.004 rows=17 loops=1)

14. 0.002 0.032 ↑ 1.0 1 1

Hash (cost=1.99..1.99 rows=1 width=8) (actual time=0.032..0.032 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
15. 0.030 0.030 ↑ 1.0 1 1

Seq Scan on store_tariff_item_sub_groups sstisg (cost=0.00..1.99 rows=1 width=8) (actual time=0.030..0.030 rows=1 loops=1)

  • Filter: ((item_id = 3941) AND (store_rate_plan_id = 19))
  • Rows Removed by Filter: 120
16. 0.020 0.048 ↑ 1.0 1 1

Hash Right Join (cost=2.00..3.25 rows=1 width=130) (actual time=0.042..0.048 rows=1 loops=1)

  • Hash Cond: (isg1.item_subgroup_id = stisg.item_subgroup_id)
17. 0.003 0.003 ↑ 1.0 17 1

Seq Scan on item_sub_groups isg1 (cost=0.00..1.17 rows=17 width=126) (actual time=0.001..0.003 rows=17 loops=1)

18. 0.002 0.025 ↑ 1.0 1 1

Hash (cost=1.99..1.99 rows=1 width=8) (actual time=0.025..0.025 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
19. 0.023 0.023 ↑ 1.0 1 1

Seq Scan on store_tariff_item_sub_groups stisg (cost=0.00..1.99 rows=1 width=8) (actual time=0.023..0.023 rows=1 loops=1)

  • Filter: ((item_id = 3941) AND (store_rate_plan_id = 7))
  • Rows Removed by Filter: 120
20. 0.026 0.088 ↑ 1.5 2 1

Hash Right Join (cost=15.60..17.26 rows=3 width=145) (actual time=0.083..0.088 rows=2 loops=1)

  • Hash Cond: (ig.item_group_id = isg.item_group_id)
21. 0.008 0.008 ↑ 1.0 46 1

Seq Scan on item_groups ig (cost=0.00..1.46 rows=46 width=19) (actual time=0.003..0.008 rows=46 loops=1)

22. 0.002 0.054 ↑ 1.5 2 1

Hash (cost=15.56..15.56 rows=3 width=130) (actual time=0.054..0.054 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
23. 0.028 0.052 ↑ 1.5 2 1

Hash Left Join (cost=5.69..15.56 rows=3 width=130) (actual time=0.050..0.052 rows=2 loops=1)

  • Hash Cond: (sisg.item_subgroup_id = isg.item_subgroup_id)
24. 0.002 0.010 ↑ 1.5 2 1

Bitmap Heap Scan on store_item_sub_groups sisg (cost=4.31..14.14 rows=3 width=8) (actual time=0.010..0.010 rows=2 loops=1)

  • Recheck Cond: (medicine_id = 3941)
25. 0.008 0.008 ↓ 1.3 4 1

Bitmap Index Scan on store_item_sub_groups_pkey (cost=0.00..4.31 rows=3 width=0) (actual time=0.008..0.008 rows=4 loops=1)

  • Index Cond: (medicine_id = 3941)
26. 0.008 0.014 ↑ 1.0 17 1

Hash (cost=1.17..1.17 rows=17 width=126) (actual time=0.014..0.014 rows=17 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
27. 0.006 0.006 ↑ 1.0 17 1

Seq Scan on item_sub_groups isg (cost=0.00..1.17 rows=17 width=126) (actual time=0.002..0.006 rows=17 loops=1)

28. 0.016 0.018 ↓ 2.0 2 2

Materialize (cost=0.00..1.01 rows=1 width=156) (actual time=0.005..0.009 rows=2 loops=2)

29. 0.002 0.002 ↓ 2.0 2 1

Seq Scan on item_group_type igt (cost=0.00..1.01 rows=1 width=156) (actual time=0.002..0.002 rows=2 loops=1)