explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xE6o

Settings
# exclusive inclusive rows x rows loops node
1. 244.734 1,063.543 ↑ 1.0 1 1

Aggregate (cost=1,823,109.11..1,823,109.12 rows=1 width=56) (actual time=1,063.543..1,063.543 rows=1 loops=1)

2. 0.000 200.820 ↑ 1.4 293,817 1

Gather (cost=1,000.42..226,018.40 rows=400,277 width=35) (actual time=0.655..200.820 rows=293,817 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 36.955 484.173 ↑ 1.7 58,763 5 / 5

Nested Loop Left Join (cost=0.42..184,990.70 rows=100,069 width=35) (actual time=0.147..484.173 rows=58,763 loops=5)

4. 94.638 94.638 ↑ 1.7 58,763 5 / 5

Parallel Seq Scan on document t (cost=0.00..78,221.69 rows=100,069 width=26) (actual time=0.029..94.638 rows=58,763 loops=5)

  • Filter: (NOT deleted)
5. 352.580 352.580 ↑ 1.0 1 293,817 / 5

Index Scan using invoice_unique_in_document_id on invoice j10_id (cost=0.42..1.07 rows=1 width=25) (actual time=0.006..0.006 rows=1 loops=293,817)

  • Index Cond: (document_id = t.id)
6.          

SubPlan (for Aggregate)

7. 617.985 617.985 ↑ 2.0 1 123,597

Index Scan using field_unique_in_document on field (cost=0.56..3.89 rows=2 width=9) (actual time=0.005..0.005 rows=1 loops=123,597)

  • Index Cond: ((document_id = t.id) AND (name = 'type_document'::text))
8. 0.004 0.004 ↑ 1.0 3 1

Values Scan on "*VALUES*" (cost=0.00..0.04 rows=3 width=32) (actual time=0.003..0.004 rows=3 loops=1)

Planning time : 0.948 ms
Execution time : 1,150.222 ms