explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AQJT

Settings
# exclusive inclusive rows x rows loops node
1. 368.032 1,654.566 ↑ 1.0 1 1

Aggregate (cost=4,937,235.02..4,937,235.03 rows=1 width=56) (actual time=1,654.566..1,654.566 rows=1 loops=1)

2. 0.000 207.271 ↑ 1.4 293,677 1

Gather (cost=1,000.42..226,018.40 rows=400,277 width=35) (actual time=0.624..207.271 rows=293,677 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 30.663 460.357 ↑ 1.7 58,735 5 / 5

Nested Loop Left Join (cost=0.42..184,990.70 rows=100,069 width=35) (actual time=0.153..460.357 rows=58,735 loops=5)

4. 77.282 77.282 ↑ 1.7 58,735 5 / 5

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

  • Filter: (NOT deleted)
5. 352.412 352.412 ↑ 1.0 1 293,677 / 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,677)

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

SubPlan (for Aggregate)

7. 617.625 617.625 ↑ 2.0 1 123,525

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,525)

  • Index Cond: ((document_id = t.id) AND (name = 'type_document'::text))
8. 236.818 236.818 ↑ 2.0 1 118,409

Index Scan using field_unique_in_document on field field_1 (cost=0.56..3.89 rows=2 width=9) (actual time=0.002..0.002 rows=1 loops=118,409)

  • Index Cond: ((document_id = t.id) AND (name = 'type_document'::text))
9. 224.820 224.820 ↑ 2.0 1 112,410

Index Scan using field_unique_in_document on field field_2 (cost=0.56..3.89 rows=2 width=9) (actual time=0.002..0.002 rows=1 loops=112,410)

  • Index Cond: ((document_id = t.id) AND (name = 'type_document'::text))
Planning time : 0.998 ms
Execution time : 1,742.658 ms