explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aX2i

Settings
# exclusive inclusive rows x rows loops node
1. 119,818.123 144,872.384 ↑ 1.0 1 1

Aggregate (cost=1,981,519.64..1,981,519.65 rows=1 width=8) (actual time=144,872.383..144,872.384 rows=1 loops=1)

2. 6,217.265 25,054.261 ↓ 1.2 19,528,266 1

Hash Join (cost=208.81..1,941,953.88 rows=15,826,304 width=20) (actual time=1.287..25,054.261 rows=19,528,266 loops=1)

  • Hash Cond: (api_report.rule_id = api_rule.id)
3. 18,835.854 18,836.012 ↓ 1.8 31,203,498 1

Index Only Scan using api_report_a_c_r_s_index on api_report (cost=18.55..1,895,313.75 rows=17,623,984 width=20) (actual time=0.298..18,836.012 rows=31,203,498 loops=1)

  • Index Cond: ((account = '729650'::text) AND (checked_on >= '2019-01-01 00:00:00+00'::timestamp with time zone) AND (checked_on <= '2019-08-01 23:59:59+00'::timestamp with time zone))
  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 5132894
  • Heap Fetches: 0
4.          

SubPlan (for Index Only Scan)

5. 0.158 0.158 ↑ 1.0 355 1

Seq Scan on api_ack u0 (cost=0.00..16.96 rows=355 width=4) (actual time=0.010..0.158 rows=355 loops=1)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 442
6. 0.181 0.984 ↑ 1.0 942 1

Hash (cost=178.49..178.49 rows=942 width=4) (actual time=0.983..0.984 rows=942 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 42kB
7. 0.803 0.803 ↑ 1.0 942 1

Seq Scan on api_rule (cost=0.00..178.49 rows=942 width=4) (actual time=0.006..0.803 rows=942 loops=1)

  • Filter: active
  • Rows Removed by Filter: 107
Planning time : 0.579 ms
Execution time : 144,872.445 ms