explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dl6C

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 18.115 ↑ 2.5 2 1

Sort (cost=1,951.55..1,951.56 rows=5 width=556) (actual time=18.115..18.115 rows=2 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.005 18.109 ↑ 2.5 2 1

GroupAggregate (cost=1,951.39..1,951.49 rows=5 width=556) (actual time=18.108..18.109 rows=2 loops=1)

  • Group Key: t.category, t.projectid
3. 0.009 18.104 ↑ 1.0 5 1

Sort (cost=1,951.39..1,951.40 rows=5 width=548) (actual time=18.102..18.104 rows=5 loops=1)

  • Sort Key: t.category, t.projectid
  • Sort Method: quicksort Memory: 25kB
4. 0.001 18.095 ↑ 1.0 5 1

Subquery Scan on t (cost=1,951.27..1,951.33 rows=5 width=548) (actual time=18.093..18.095 rows=5 loops=1)

5. 0.003 18.094 ↑ 1.0 5 1

Limit (cost=1,951.27..1,951.28 rows=5 width=556) (actual time=18.092..18.094 rows=5 loops=1)

6. 0.118 18.091 ↑ 24.6 5 1

Sort (cost=1,951.27..1,951.58 rows=123 width=556) (actual time=18.091..18.091 rows=5 loops=1)

  • Sort Key: mch.contactdate DESC
  • Sort Method: top-N heapsort Memory: 25kB
7. 1.394 17.973 ↓ 3.3 404 1

Nested Loop Left Join (cost=1.56..1,949.22 rows=123 width=556) (actual time=1.053..17.973 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. 0.860 16.175 ↓ 3.3 404 1

Nested Loop Left Join (cost=1.56..1,806.29 rows=123 width=254) (actual time=0.646..16.175 rows=404 loops=1)

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

Nested Loop (cost=1.56..1,664.89 rows=123 width=225) (actual time=0.065..14.507 rows=404 loops=1)

10. 0.396 2.612 ↓ 3.4 413 1

Nested Loop (cost=1.00..1,551.26 rows=123 width=41) (actual time=0.036..2.612 rows=413 loops=1)

11. 0.536 0.536 ↓ 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=0.029..0.536 rows=420 loops=1)

  • Index Cond: ((contactid)::text = 'npoclilg85k6o0000li1mut850oh8174'::text)
12. 1.680 1.680 ↑ 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=0.004..0.004 rows=1 loops=420)

  • Index Cond: (uuid = mch.interaction)
13. 11.564 11.564 ↑ 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=0.028..0.028 rows=1 loops=413)

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

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

15. 0.571 0.571 ↓ 2.0 4 1

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

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

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

17. 0.393 0.393 ↓ 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.245..0.393 rows=4 loops=1)

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