explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m0s7

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 9,585.644 ↑ 2.5 2 1

Sort (cost=1,951.39..1,951.41 rows=5 width=556) (actual time=9,585.643..9,585.644 rows=2 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.008 9,585.628 ↑ 2.5 2 1

GroupAggregate (cost=1,951.23..1,951.33 rows=5 width=556) (actual time=9,585.627..9,585.628 rows=2 loops=1)

  • Group Key: t.category, t.projectid
3. 0.018 9,585.620 ↑ 1.0 5 1

Sort (cost=1,951.23..1,951.25 rows=5 width=548) (actual time=9,585.620..9,585.620 rows=5 loops=1)

  • Sort Key: t.category, t.projectid
  • Sort Method: quicksort Memory: 25kB
4. 0.002 9,585.602 ↑ 1.0 5 1

Subquery Scan on t (cost=1,951.11..1,951.18 rows=5 width=548) (actual time=9,585.601..9,585.602 rows=5 loops=1)

5. 0.001 9,585.600 ↑ 1.0 5 1

Limit (cost=1,951.11..1,951.13 rows=5 width=556) (actual time=9,585.599..9,585.600 rows=5 loops=1)

6. 0.794 9,585.599 ↑ 24.6 5 1

Sort (cost=1,951.11..1,951.42 rows=123 width=556) (actual time=9,585.598..9,585.599 rows=5 loops=1)

  • Sort Key: mch.contactdate DESC
  • Sort Method: top-N heapsort Memory: 25kB
7. 2.787 9,584.805 ↓ 3.3 404 1

Nested Loop Left Join (cost=1.56..1,949.07 rows=123 width=556) (actual time=13.241..9,584.805 rows=404 loops=1)

  • Join Filter: ((((mcf.jsondata #>> '{group001,cdisp,value,0}'::text[]) || '_'::text) || 'spb'::text) = (smart_route_citycall.code)::text)
  • Rows Removed by Join Filter: 1532
8. 3.674 9,580.806 ↓ 3.3 404 1

Nested Loop Left Join (cost=1.56..1,806.14 rows=123 width=254) (actual time=12.323..9,580.806 rows=404 loops=1)

  • Join Filter: ((mcf.jsondata #>> '{group001,cdisp,value,0}'::text[]) = (smart_route.code)::text)
  • Rows Removed by Join Filter: 1532
9. 1.601 9,575.516 ↓ 3.3 404 1

Nested Loop (cost=1.56..1,664.74 rows=123 width=225) (actual time=11.186..9,575.516 rows=404 loops=1)

10. 1.787 5,718.973 ↓ 3.4 413 1

Nested Loop (cost=1.00..1,551.26 rows=123 width=41) (actual time=11.049..5,718.973 rows=413 loops=1)

11. 2,105.606 2,105.606 ↓ 3.4 420 1

Index Scan using idx_mv_c_history_cnt on mv_contact_history mch (cost=0.56..493.45 rows=125 width=16) (actual time=11.035..2,105.606 rows=420 loops=1)

  • Index Cond: ((contactid)::text = 'npoclilg85k6o0000li1mut850oh8174'::text)
12. 3,611.580 3,611.580 ↑ 1.0 1 420

Index Scan using mv_pc_pk on mv_phone_call mpc (cost=0.43..8.45 rows=1 width=41) (actual time=8.550..8.599 rows=1 loops=420)

  • Index Cond: (uuid = mch.interaction)
13. 3,854.942 3,854.942 ↑ 1.0 1 413

Index Scan using mv_custom_form_pk on mv_custom_form mcf (cost=0.56..0.91 rows=1 width=250) (actual time=9.312..9.334 rows=1 loops=413)

  • Index Cond: ((uuid)::text = (mpc.formuuid)::text)
14. 0.505 1.616 ↓ 2.0 4 404

Materialize (cost=0.00..137.10 rows=2 width=47) (actual time=0.002..0.004 rows=4 loops=404)

15. 1.111 1.111 ↓ 2.0 4 1

Seq Scan on mv_catalog_item smart_route (cost=0.00..137.09 rows=2 width=47) (actual time=0.697..1.111 rows=4 loops=1)

  • Filter: ((cataloguuid)::text = 'pstfld00000000000m4f76qch47nl5ig'::text)
  • Rows Removed by Filter: 2724
16. 0.317 1.212 ↓ 2.0 4 404

Materialize (cost=0.00..137.10 rows=2 width=47) (actual time=0.002..0.003 rows=4 loops=404)

17. 0.895 0.895 ↓ 2.0 4 1

Seq Scan on mv_catalog_item smart_route_citycall (cost=0.00..137.09 rows=2 width=47) (actual time=0.557..0.895 rows=4 loops=1)

  • Filter: ((cataloguuid)::text = 'pstfld00000000000m4f76qch47nl5ig'::text)
  • Rows Removed by Filter: 2724