explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 91fJ

Settings
# exclusive inclusive rows x rows loops node
1. 2.596 512.599 ↑ 1.0 1 1

Aggregate (cost=1,693,434.35..1,693,434.36 rows=1 width=8) (actual time=512.599..512.599 rows=1 loops=1)

  • Functions: 70
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 8.329 ms, Inlining 159.680 ms, Optimization 323.488 ms, Emission 200.478 ms, Total 691.975 ms
2. 0.000 510.003 ↓ 7.4 19,762 1

Nested Loop (cost=1,021.35..1,693,427.71 rows=2,658 width=0) (actual time=358.134..510.003 rows=19,762 loops=1)

3. 134.953 134.953 ↑ 1.0 1 1

Index Scan using api_rule_pkey on api_rule (cost=0.28..8.29 rows=1 width=4) (actual time=134.952..134.953 rows=1 loops=1)

  • Index Cond: (id = 1101)
  • Filter: active
4. 30.412 376.383 ↓ 7.4 19,762 1

Gather (cost=1,021.08..1,693,392.83 rows=2,658 width=4) (actual time=223.179..376.383 rows=19,762 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 304.725 345.971 ↓ 5.9 6,587 3

Nested Loop (cost=21.08..1,692,127.03 rows=1,108 width=4) (actual time=241.945..345.971 rows=6,587 loops=3)

6. 41.239 41.239 ↑ 2.2 22,729 3

Parallel Index Scan using api_upload_current_account_index on api_upload (cost=0.56..217,488.04 rows=49,832 width=4) (actual time=0.090..41.239 rows=22,729 loops=3)

  • Index Cond: ((current = true) AND ((account)::text = '729650'::text))
7. 0.000 0.007 ↓ 0.0 0 68,188

Index Only Scan using api_report_upload_id_rule_id_1a55a613_uniq on api_report (cost=20.51..38.67 rows=2 width=8) (actual time=0.007..0.007 rows=0 loops=68,188)

  • Index Cond: ((upload_id = api_upload.id) AND (rule_id = 1101))
  • Filter: (NOT (hashed SubPlan 1))
  • Heap Fetches: 19762
8.          

SubPlan (for Index Only Scan)

9. 46.042 46.042 ↑ 1.0 355 3

Seq Scan on api_ack u2 (cost=0.00..19.05 rows=355 width=4) (actual time=45.894..46.042 rows=355 loops=3)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 529
Planning time : 0.747 ms
Execution time : 521.174 ms