explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ptuz

Settings
# exclusive inclusive rows x rows loops node
1. 0.088 4,975.369 ↓ 12.0 12 1

Limit (cost=34,338.43..34,338.44 rows=1 width=63) (actual time=4,975.281..4,975.369 rows=12 loops=1)

  • Output: e.id, (count(*) OVER (?)), e.name, e.vat_number, e.email, p.id
2. 198.287 4,975.281 ↓ 12.0 12 1

Sort (cost=34,338.43..34,338.44 rows=1 width=63) (actual time=4,975.280..4,975.281 rows=12 loops=1)

  • Output: e.id, (count(*) OVER (?)), e.name, e.vat_number, e.email, p.id
  • Sort Key: p.id
  • Sort Method: top-N heapsort Memory: 26kB
3. 562.636 4,776.994 ↓ 1,193,033.0 1,193,033 1

WindowAgg (cost=1,009.46..34,338.42 rows=1 width=63) (actual time=4,578.795..4,776.994 rows=1,193,033 loops=1)

  • Output: e.id, count(*) OVER (?), e.name, e.vat_number, e.email, p.id
4. 25.565 4,214.358 ↓ 1,193,033.0 1,193,033 1

Gather (cost=1,009.46..34,338.41 rows=1 width=55) (actual time=1,127.591..4,214.358 rows=1,193,033 loops=1)

  • Output: e.id, e.name, e.vat_number, e.email, p.id
  • Workers Planned: 2
  • Workers Launched: 2
5. 1,339.606 4,188.793 ↓ 397,678.0 397,678 3

Nested Loop (cost=9.46..33,338.31 rows=1 width=55) (actual time=1,124.065..4,188.793 rows=397,678 loops=3)

  • Output: e.id, e.name, e.vat_number, e.email, p.id
  • Worker 0: actual time=1122.528..4336.531 rows=400969 loops=1
  • Worker 1: actual time=1122.922..4337.446 rows=405280 loops=1
6. 2,605.944 2,849.184 ↓ 397,678.0 397,678 3

Nested Loop (cost=9.03..33,333.94 rows=1 width=24) (actual time=1,124.035..2,849.184 rows=397,678 loops=3)

  • Output: p.id, p.filler_id_uuid
  • Worker 0: actual time=1122.485..2929.646 rows=400969 loops=1
  • Worker 1: actual time=1122.884..2935.214 rows=405280 loops=1
7. 243.198 243.237 ↓ 293,220.7 879,662 3

Hash Join (cost=8.59..33,295.80 rows=3 width=8) (actual time=0.140..243.237 rows=879,662 loops=3)

  • Output: oa.account_entity_id
  • Inner Unique: true
  • Hash Cond: (oa.operation_entity_id = p2.filler_id)
  • Worker 0: actual time=0.207..244.289 rows=859698 loops=1
  • Worker 1: actual time=0.180..248.052 rows=866320 loops=1
  • -> Parallel Seq Scan on izipay.operation_account oa (cost=0.00..30400.78 rows=1099578 width=16) (actual time=0.013..83.558 rows=879662 loops
  • Output: oa.operation_entity_id, oa.account_entity_id, oa.account_type_id, oa.date_creation
  • Worker 0: actual time=0.016..88.660 rows=859698 loops=1
  • Worker 1: actual time=0.016..89.049 rows=866320 loops=1
8. 0.002 0.039 ↑ 1.0 1 3

Hash (cost=8.58..8.58 rows=1 width=8) (actual time=0.039..0.039 rows=1 loops=3)

  • Output: p2.filler_id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Worker 0: actual time=0.051..0.051 rows=1 loops=1
  • Worker 1: actual time=0.049..0.049 rows=1 loops=1
9. 0.037 0.037 ↑ 1.0 1 3

Index Scan using ix_process_id_uuid on dms.process p2 (cost=0.56..8.58 rows=1 width=8) (actual time=0.036..0.037 rows=1 loops=3)

  • Output: p2.filler_id
  • Index Cond: (p2.id_uuid = 'f5b3c354-c48a-4de0-8613-b0bb68d73cd0'::uuid)
  • Filter: (p2.process_template_id = 82)
  • Worker 0: actual time=0.047..0.048 rows=1 loops=1
  • Worker 1: actual time=0.046..0.046 rows=1 loops=1
10. 0.003 0.003 ↓ 0.0 0 2,638,986

Index Scan using ix_process_filler_id on dms.process p (cost=0.44..12.69 rows=3 width=32) (actual time=0.002..0.003 rows=0 loops=2,638,986)

  • Output: p.id, p.id_uuid, p.date_creation, p.date_update, p.identification_number, p.workflow_state_id, p.user_main_taker, p.description, p.pro
  • Index Cond: (p.filler_id = oa.account_entity_id)
  • Filter: (p.process_template_id = ANY ('{89,112}'::bigint[]))
  • Rows Removed by Filter: 1
  • Worker 0: actual time=0.002..0.003 rows=0 loops=859698
  • Worker 1: actual time=0.002..0.003 rows=0 loops=866320
11. 0.003 0.003 ↑ 1.0 1 1,193,033

Index Scan using idx_entity_uuid on public.entity e (cost=0.43..4.36 rows=1 width=63) (actual time=0.003..0.003 rows=1 loops=1,193,033)

  • Output: e.id, e.company_id, e.date_creation, e.date_change, e.date_user_change, e.name_prefix, e.name, e.phone_home, e.phone_job, e.phone_celular, e
  • Index Cond: (e.id_uuid = p.filler_id_uuid)
  • Worker 0: actual time=0.003..0.003 rows=1 loops=400969
  • Worker 1: actual time=0.003..0.003 rows=1 loops=405280