explain.depesz.com

PostgreSQL's explain analyze made readable

Result: inls

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 933,055.708 ↓ 0.0 0 1

Merge Anti Join (cost=226,999.67..29,463,869.36 rows=1 width=70) (actual time=933,055.708..933,055.708 rows=0 loops=1)

  • Merge Cond: (a.service_id = bs_payms.service_id)
2. 238,883.883 933,055.702 ↓ 0.0 0 1

Merge Join (cost=75,620.82..28,073,233.16 rows=4,858,117 width=52) (actual time=933,055.702..933,055.702 rows=0 loops=1)

  • Merge Cond: (a.service_id = b.service_id)
3. 693,057.511 693,057.511 ↑ 1.0 150,232,959 1

Index Scan using bs_payms_cl_by_service_id on bs_payms_cl a (cost=0.57..27,124,591.75 rows=150,290,428 width=52) (actual time=154.639..693,057.511 rows=150,232,959 loops=1)

  • Filter: (clinic_id = 1)
  • Rows Removed by Filter: 405,843
4. 449.626 1,114.308 ↑ 98.6 1,781 1

Sort (cost=68,998.60..69,437.46 rows=175,543 width=8) (actual time=1,110.617..1,114.308 rows=1,781 loops=1)

  • Sort Key: b.service_id
  • Sort Method: quicksort Memory: 13,252kB
5. 664.682 664.682 ↓ 1.0 176,795 1

Index Scan using se_dests_index_21 on se_dests b (cost=0.45..53,707.52 rows=175,543 width=8) (actual time=0.054..664.682 rows=176,795 loops=1)

  • Index Cond: (date > (date(now()) - 30))
6. 0.000 0.000 ↓ 0.0 0

Index Only Scan using bs_payms_clinic_service on bs_payms (cost=0.43..856,237.49 rows=5,162,442 width=8) (never executed)

  • Index Cond: (clinic_id = 1)
  • Heap Fetches: 0
Planning time : 3.153 ms
Execution time : 933,061.834 ms