explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8f6P

Settings
# exclusive inclusive rows x rows loops node
1. 4.538 1,720.432 ↓ 68.8 1,514 1

Sort (cost=16,407,091.86..16,407,091.92 rows=22 width=112) (actual time=1,720.353..1,720.432 rows=1,514 loops=1)

  • Sort Key: subscribers.mandant_id, subscribers.external_id
  • Sort Method: quicksort Memory: 305kB
2. 2.079 1,715.894 ↓ 68.8 1,514 1

Nested Loop (cost=0.85..16,407,091.37 rows=22 width=112) (actual time=67.245..1,715.894 rows=1,514 loops=1)

3. 0.954 1,676.165 ↓ 114.1 2,510 1

Unique (cost=0.43..16,406,905.42 rows=22 width=4) (actual time=8.006..1,676.165 rows=2,510 loops=1)

4. 1,655.107 1,675.211 ↓ 228.2 5,020 1

Index Scan using index_subscriber_ecr_codes_on_subscriber_id on subscriber_ecr_codes sec1 (cost=0.43..16,406,905.36 rows=22 width=4) (actual time=8.005..1,675.211 rows=5,020 loops=1)

  • Filter: ((ecr_code IS NULL) AND (updated_at = (SubPlan 1)))
  • Rows Removed by Filter: 1,802,107
5.          

SubPlan (for Index Scan)

6. 5.026 20.104 ↑ 1.0 1 5,026

Aggregate (cost=9.01..9.02 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=5,026)

7. 15.078 15.078 ↑ 1.0 1 5,026

Index Scan using index_subscriber_ecr_codes_on_subscriber_id on subscriber_ecr_codes sec2 (cost=0.43..9.01 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=5,026)

  • Index Cond: (subscriber_id = sec1.subscriber_id)
  • Filter: ((notruftyp)::text = (sec1.notruftyp)::text)
  • Rows Removed by Filter: 1
8. 37.650 37.650 ↑ 1.0 1 2,510

Index Scan using subscribers_pkey on subscribers (cost=0.42..8.44 rows=1 width=112) (actual time=0.015..0.015 rows=1 loops=2,510)

  • Index Cond: (id = sec1.subscriber_id)
  • Filter: (NOT deleted)
  • Rows Removed by Filter: 0
Planning time : 1.023 ms
Execution time : 1,720.764 ms