explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qh7I

Settings
# exclusive inclusive rows x rows loops node
1. 4.030 3,436.473 ↓ 50.1 1,502 1

Sort (cost=25,295.14..25,295.22 rows=30 width=257) (actual time=3,436.053..3,436.473 rows=1,502 loops=1)

  • Sort Key: ceappt_t.appt_strt_ts
  • Sort Method: quicksort Memory: 1131kB
2.          

Initplan (forSort)

3. 0.002 0.020 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.55..16.62 rows=1 width=4) (actual time=0.019..0.020 rows=1 loops=1)

4. 0.012 0.012 ↑ 1.0 1 1

Index Scan using ixpk_userorganization_t on userorganization_t userorganization_t_1 (cost=0.28..8.29 rows=1 width=4) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: (user_org_uid = 98)
5. 0.006 0.006 ↑ 1.0 1 1

Index Scan using ixpk_organization_t on organization_t organization_t_1 (cost=0.27..8.29 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (org_uid = userorganization_t_1.org_uid)
6. 10.992 3,432.423 ↓ 50.1 1,502 1

Nested Loop (cost=5.50..25,277.78 rows=30 width=257) (actual time=34.917..3,432.423 rows=1,502 loops=1)

7. 5.714 61.457 ↓ 50.1 1,502 1

Nested Loop (cost=5.22..219.43 rows=30 width=122) (actual time=21.383..61.457 rows=1,502 loops=1)

8. 12.691 37.903 ↓ 52.5 8,920 1

Nested Loop (cost=4.94..158.14 rows=170 width=53) (actual time=4.618..37.903 rows=8,920 loops=1)

9. 0.402 13.902 ↓ 29.0 290 1

Nested Loop (cost=4.65..68.11 rows=10 width=18) (actual time=0.539..13.902 rows=290 loops=1)

10. 0.281 9.440 ↓ 29.0 290 1

Nested Loop (cost=4.37..64.79 rows=10 width=8) (actual time=0.525..9.440 rows=290 loops=1)

11. 0.159 0.159 ↓ 20.0 40 1

Seq Scan on organization_t (cost=0.00..13.09 rows=2 width=4) (actual time=0.061..0.159 rows=40 loops=1)

  • Filter: (site_org_uid = $15)
  • Rows Removed by Filter: 367
12. 8.800 9.000 ↑ 1.7 7 40

Bitmap Heap Scan on userorganization_t (cost=4.37..25.73 rows=12 width=12) (actual time=0.108..0.225 rows=7 loops=40)

  • Recheck Cond: (org_uid = organization_t.org_uid)
  • Heap Blocks: exact=127
13. 0.200 0.200 ↑ 1.7 7 40

Bitmap Index Scan on ixf03_orguid (cost=0.00..4.37 rows=12 width=0) (actual time=0.005..0.005 rows=7 loops=40)

  • Index Cond: (org_uid = organization_t.org_uid)
14. 4.060 4.060 ↑ 1.0 1 290

Index Scan using ixpk_dcpsuser_t on dcpsuser_t (cost=0.28..0.33 rows=1 width=18) (actual time=0.014..0.014 rows=1 loops=290)

  • Index Cond: (user_uid = userorganization_t.user_uid)
15. 11.310 11.310 ↑ 5.1 31 290

Index Scan using ixf03_dcpscase_t_user_org on dcpscase_t (cost=0.29..7.42 rows=158 width=43) (actual time=0.003..0.039 rows=31 loops=290)

  • Index Cond: (asgnd_user_org_uid = userorganization_t.user_org_uid)
16. 17.840 17.840 ↓ 0.0 0 8,920

Index Scan using ix_ceappt_t_dcps_case_uid on ceappt_t (cost=0.29..0.35 rows=1 width=69) (actual time=0.002..0.002 rows=0 loops=8,920)

  • Index Cond: (dcps_case_uid = dcpscase_t.dcps_case_uid)
  • Filter: ((prnt_appt_uid IS NULL) AND ((appt_stus_cd)::text = ANY ('{SCHD,CNCL,KEPT,NOKT}'::text[])))
  • Rows Removed by Filter: 0
17. 7.510 7.510 ↑ 1.0 1 1,502

Index Scan using ixf02_pin on dcpsuser_t dcpsuser_t_1 (cost=0.28..0.31 rows=1 width=20) (actual time=0.004..0.005 rows=1 loops=1,502)

  • Index Cond: ((pin)::text = (ceappt_t.insrt_pin)::text)
18.          

SubPlan (forNested Loop)

19. 6.008 1,210.612 ↑ 1.0 1 1,502

Result (cost=280.27..280.28 rows=1 width=32) (actual time=0.805..0.806 rows=1 loops=1,502)

20.          

Initplan (forResult)

21. 9.642 1,204.604 ↓ 2.0 2 1,502

Nested Loop (cost=0.56..280.27 rows=1 width=32) (actual time=0.454..0.802 rows=2 loops=1,502)

22. 6.638 1,185.078 ↓ 2.0 2 1,502

Nested Loop (cost=0.28..279.89 rows=1 width=12) (actual time=0.445..0.789 rows=2 loops=1,502)

23. 1,168.556 1,168.556 ↓ 2.0 2 1,502

Seq Scan on ceapptitem_t (cost=0.00..271.59 rows=1 width=8) (actual time=0.438..0.778 rows=2 loops=1,502)

  • Filter: (ce_appt_uid = ceappt_t.ce_appt_uid)
  • Rows Removed by Filter: 11085
24. 9.884 9.884 ↑ 1.0 1 2,471

Index Scan using catalog_product_uid_pkey on stcatlgprod_t (cost=0.28..8.30 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=2,471)

  • Index Cond: (st_catlg_prod_uid = ceapptitem_t.st_catlg_prod_uid)
25. 9.884 9.884 ↑ 1.0 1 2,471

Index Scan using prod_uid_pkey on product_t (cost=0.28..0.38 rows=1 width=39) (actual time=0.004..0.004 rows=1 loops=2,471)

  • Index Cond: (prod_uid = stcatlgprod_t.prod_uid)
26. 6.428 1,112.982 ↑ 1.0 1 1,502

Nested Loop (cost=0.42..13.01 rows=1 width=32) (actual time=0.456..0.741 rows=1 loops=1,502)

  • Join Filter: (corrtrkg_t.pkg_id = pkg_t.pkg_uid)
  • Rows Removed by Join Filter: 0
27. 1,091.954 1,091.954 ↑ 1.0 1 1,502

Index Scan using ixf03_rqstuid on corrtrkg_t (cost=0.42..8.44 rows=1 width=13) (actual time=0.444..0.727 rows=1 loops=1,502)

  • Index Cond: (rqst_uid = ceappt_t.ce_appt_uid)
  • Filter: (((rqst_typ_cd)::text = 'CE'::text) AND ((rcpnt_typ_cd)::text = 'M'::text))
  • Rows Removed by Filter: 3
28. 14.600 14.600 ↑ 1.0 1 1,825

Seq Scan on pkg_t (cost=0.00..4.55 rows=1 width=4) (actual time=0.005..0.008 rows=1 loops=1,825)

  • Filter: ((pkg_id)::text = '98022179'::text)
  • Rows Removed by Filter: 44
29. 3.004 1,003.336 ↑ 1.0 1 1,502

Result (cost=537.77..537.78 rows=1 width=32) (actual time=0.668..0.668 rows=1 loops=1,502)

30.          

Initplan (forResult)

31. 1.502 1,000.332 ↓ 0.0 0 1,502

Subquery Scan on t (cost=537.75..537.77 rows=1 width=32) (actual time=0.666..0.666 rows=0 loops=1,502)

32. 4.506 998.830 ↓ 0.0 0 1,502

Sort (cost=537.75..537.76 rows=1 width=94) (actual time=0.665..0.665 rows=0 loops=1,502)

  • Sort Key: ceappt_t_1.ce_appt_uid
  • Sort Method: quicksort Memory: 25kB
33. 972.512 994.324 ↓ 0.0 0 1,502

Seq Scan on ceappt_t ceappt_t_1 (cost=0.00..537.74 rows=1 width=94) (actual time=0.657..0.662 rows=0 loops=1,502)

  • Filter: (prnt_appt_uid = ceappt_t.ce_appt_uid)
  • Rows Removed by Filter: 8357
34.          

SubPlan (forSeq Scan)

35. 0.112 21.812 ↑ 1.0 1 28

Result (cost=280.27..280.28 rows=1 width=32) (actual time=0.778..0.779 rows=1 loops=28)

36.          

Initplan (forResult)

37. 0.262 21.700 ↑ 1.0 1 28

Nested Loop (cost=0.56..280.27 rows=1 width=32) (actual time=0.472..0.775 rows=1 loops=28)

38. 0.085 21.364 ↑ 1.0 1 28

Nested Loop (cost=0.28..279.89 rows=1 width=12) (actual time=0.463..0.763 rows=1 loops=28)

39. 21.168 21.168 ↑ 1.0 1 28

Seq Scan on ceapptitem_t ceapptitem_t_1 (cost=0.00..271.59 rows=1 width=8) (actual time=0.457..0.756 rows=1 loops=28)

  • Filter: (ce_appt_uid = ceappt_t_1.ce_appt_uid)
  • Rows Removed by Filter: 11086
40. 0.111 0.111 ↑ 1.0 1 37

Index Scan using catalog_product_uid_pkey on stcatlgprod_t stcatlgprod_t_1 (cost=0.28..8.30 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=37)

  • Index Cond: (st_catlg_prod_uid = ceapptitem_t_1.st_catlg_prod_uid)
41. 0.074 0.074 ↑ 1.0 1 37

Index Scan using prod_uid_pkey on product_t product_t_1 (cost=0.28..0.38 rows=1 width=39) (actual time=0.002..0.002 rows=1 loops=37)

  • Index Cond: (prod_uid = stcatlgprod_t_1.prod_uid)
42. 3.004 25.534 ↑ 1.0 1 1,502

Result (cost=3.88..3.89 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=1,502)

43.          

Initplan (forResult)

44. 0.000 22.530 ↓ 0.0 0 1,502

Sort (cost=3.88..3.88 rows=2 width=4) (actual time=0.015..0.015 rows=0 loops=1,502)

  • Sort Key: rltdceappt_t_1.lnkd_ce_appt_uid
  • Sort Method: quicksort Memory: 25kB
45.          

Initplan (forSort)

46. 7.510 7.510 ↓ 0.0 0 1,502

Seq Scan on rltdceappt_t (cost=0.00..1.85 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=1,502)

  • Filter: (lnkd_ce_appt_uid = ceappt_t.ce_appt_uid)
  • Rows Removed by Filter: 68
47. 18.024 18.024 ↓ 0.0 0 1,502

Seq Scan on rltdceappt_t rltdceappt_t_1 (cost=0.00..2.02 rows=2 width=4) (actual time=0.012..0.012 rows=0 loops=1,502)

  • Filter: ((lnkd_ce_appt_uid <> ceappt_t.ce_appt_uid) AND (ce_appt_uid = $12))
  • Rows Removed by Filter: 68