explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FfAX

Settings
# exclusive inclusive rows x rows loops node
1. 146.846 186.894 ↓ 3.5 700 1

HashAggregate (cost=432,821.19..436,577.69 rows=200 width=56) (actual time=170.345..186.894 rows=700 loops=1)

  • Group Key: analyses.id
2.          

CTE analyses

3. 0.129 1.000 ↑ 1.0 700 1

Limit (cost=0.29..32.86 rows=700 width=24) (actual time=0.011..1.000 rows=700 loops=1)

4. 0.871 0.871 ↑ 85.8 700 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.010..0.871 rows=700 loops=1)

  • Filter: (is_current IS TRUE)
5. 13.961 38.648 ↑ 2.2 70,329 1

Nested Loop Left Join (cost=10.00..432,008.39 rows=155,989 width=71) (actual time=0.048..38.648 rows=70,329 loops=1)

6. 1.587 1.587 ↑ 1.0 700 1

CTE Scan on analyses (cost=0.00..14.00 rows=700 width=16) (actual time=0.013..1.587 rows=700 loops=1)

7. 16.100 23.100 ↑ 2.2 100 700

Bitmap Heap Scan on classifications (cost=10.00..614.90 rows=223 width=71) (actual time=0.014..0.033 rows=100 loops=700)

  • Recheck Cond: (analyses.id = analysis_id)
  • Heap Blocks: exact=2788
8. 7.000 7.000 ↑ 2.2 100 700

Bitmap Index Scan on ix_doc_analysis_classifications_analysis_id (cost=0.00..9.94 rows=223 width=0) (actual time=0.010..0.010 rows=100 loops=700)

  • Index Cond: (analyses.id = analysis_id)
9.          

SubPlan (for HashAggregate)

10. 1.400 1.400 ↑ 1.0 1 700

Aggregate (cost=18.76..18.77 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=700)

11. 0.000 0.000 ↓ 0.0 0 700

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

  • Filter: (analyses.id = analysis_id)
Planning time : 0.248 ms
Execution time : 188.011 ms