explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KERE

Settings
# exclusive inclusive rows x rows loops node
1. 1.463 49,937.130 ↑ 1.0 1 1

Aggregate (cost=336,032.94..336,032.97 rows=1 width=8) (actual time=49,937.130..49,937.130 rows=1 loops=1)

2. 4.050 49,935.667 ↓ 137.0 26,298 1

Unique (cost=336,025.74..336,026.70 rows=192 width=88) (actual time=49,929.593..49,935.667 rows=26,298 loops=1)

3. 20.871 49,931.617 ↓ 151.5 29,094 1

Sort (cost=336,025.74..336,026.22 rows=192 width=88) (actual time=49,929.592..49,931.617 rows=29,094 loops=1)

  • Sort Key: detective_suspectredflaglog.suspect_id
  • Sort Method: quicksort Memory: 2132kB
4. 51.808 49,910.746 ↓ 151.5 29,094 1

Nested Loop (cost=1,000.42..336,018.46 rows=192 width=88) (actual time=23.065..49,910.746 rows=29,094 loops=1)

5. 0.000 128.886 ↑ 1.3 29,994 1

Gather (cost=1,000.00..60,555.12 rows=38,464 width=4) (actual time=18.745..128.886 rows=29,994 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 297.619 297.619 ↑ 1.6 9,998 3

Parallel Seq Scan on detective_suspectredflaglog (cost=0.00..55,708.72 rows=16,027 width=4) (actual time=11.164..297.619 rows=9,998 loops=3)

  • Filter: ((created >= '2019-01-02 00:00:00'::timestamp without time zone) AND (redflag_id = 3))
  • Rows Removed by Filter: 1229249
7. 209.958 49,730.052 ↑ 1.0 1 29,994

Index Scan using detective_suspect_pkey on detective_suspect (cost=0.42..7.16 rows=1 width=4) (actual time=1.658..1.658 rows=1 loops=29,994)

  • Index Cond: (id = detective_suspectredflaglog.suspect_id)
  • Filter: ((created IS NOT NULL) AND ((SubPlan 1) IS NULL))
  • Rows Removed by Filter: 0
8.          

SubPlan (forIndex Scan)

9. 59.988 49,520.094 ↓ 0.0 0 29,994

Limit (cost=0.00..6.64 rows=1 width=7) (actual time=1.651..1.651 rows=0 loops=29,994)

10. 49,460.106 49,460.106 ↓ 0.0 0 29,994

Seq Scan on detective_distilblock d (cost=0.00..723.66 rows=109 width=7) (actual time=1.649..1.649 rows=0 loops=29,994)

  • Filter: (detective_suspect.ip <<= ip)
  • Rows Removed by Filter: 21390