explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8ScR

Settings
# exclusive inclusive rows x rows loops node
1. 119.187 3,057.462 ↓ 4.0 800 1

HashAggregate (cost=451,095.93..454,852.43 rows=200 width=56) (actual time=3,049.031..3,057.462 rows=800 loops=1)

  • Group Key: analyses.id
2.          

CTE analyses

3. 0.047 0.286 ↑ 1.0 800 1

Limit (cost=0.29..37.51 rows=800 width=24) (actual time=0.018..0.286 rows=800 loops=1)

4. 0.239 0.239 ↑ 75.1 800 1

Index Scan Backward using ix_doc_analysis_analyses_created_at on analyses analyses_1 (cost=0.29..2,794.02 rows=60,049 width=24) (actual time=0.017..0.239 rows=800 loops=1)

  • Filter: (is_current IS TRUE)
5. 554.259 2,937.475 ↑ 2.2 80,329 1

Hash Left Join (cost=376,178.33..450,167.05 rows=178,273 width=71) (actual time=2,384.985..2,937.475 rows=80,329 loops=1)

  • Hash Cond: (analyses.id = classifications.analysis_id)
6. 0.498 0.498 ↑ 1.0 800 1

CTE Scan on analyses (cost=0.00..16.00 rows=800 width=16) (actual time=0.021..0.498 rows=800 loops=1)

7. 1,279.366 2,382.718 ↑ 1.0 6,002,428 1

Hash (cost=230,730.70..230,730.70 rows=6,005,570 width=71) (actual time=2,382.718..2,382.718 rows=6,002,428 loops=1)

  • Buckets: 65536 Batches: 256 Memory Usage: 3157kB
8. 1,103.352 1,103.352 ↑ 1.0 6,002,428 1

Seq Scan on classifications (cost=0.00..230,730.70 rows=6,005,570 width=71) (actual time=0.029..1,103.352 rows=6,002,428 loops=1)

9.          

SubPlan (for HashAggregate)

10. 0.800 0.800 ↑ 1.0 1 800

Aggregate (cost=18.76..18.77 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=800)

11. 0.000 0.000 ↓ 0.0 0 800

Seq Scan on comments (cost=0.00..18.75 rows=4 width=16) (actual time=0.000..0.000 rows=0 loops=800)

  • Filter: (analyses.id = analysis_id)
Planning time : 0.288 ms
Execution time : 3,058.011 ms