explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tkGp

Settings
# exclusive inclusive rows x rows loops node
1. 0.082 33,784.795 ↓ 12.0 12 1

Limit (cost=1,015.88..35,602.93 rows=1 width=133) (actual time=33,784.708..33,784.795 rows=12 loops=1)

2. 589.381 33,784.713 ↓ 12.0 12 1

WindowAgg (cost=1,015.88..35,602.93 rows=1 width=133) (actual time=33,784.707..33,784.713 rows=12 loops=1)

3. 10,681.493 33,195.332 ↓ 1,193,033.0 1,193,033 1

Nested Loop (cost=1,015.88..35,602.92 rows=1 width=125) (actual time=1,288.463..33,195.332 rows=1,193,033 loops=1)

  • Join Filter: (p.workflow_state_id = ws.id)
  • Rows Removed by Join Filter: 177762929
4. 0.000 10,583.509 ↓ 1,193,033.0 1,193,033 1

Nested Loop (cost=1,015.88..35,561.40 rows=1 width=118) (actual time=1,288.425..10,583.509 rows=1,193,033 loops=1)

5. 1,329.260 8,236.052 ↓ 1,193,033.0 1,193,033 1

Nested Loop (cost=1,015.32..35,556.22 rows=1 width=150) (actual time=1,288.399..8,236.052 rows=1,193,033 loops=1)

6. 41.683 3,327.693 ↓ 1,193,033.0 1,193,033 1

Gather (cost=1,014.89..35,551.63 rows=1 width=97) (actual time=1,288.369..3,327.693 rows=1,193,033 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 2,950.265 3,286.010 ↓ 397,678.0 397,678 3

Nested Loop (cost=14.89..34,551.53 rows=1 width=97) (actual time=1,284.767..3,286.010 rows=397,678 loops=3)

8. 335.650 335.742 ↓ 879,662.0 879,662 3

Hash Join (cost=14.45..34,538.65 rows=1 width=65) (actual time=0.170..335.742 rows=879,662 loops=3)

  • Hash Cond: (oa.operation_entity_id = e1.id)
  • -> Parallel Seq Scan on operation_account oa (cost=0.00..30400.78 rows=1099578 width=16) (actual time=0.021..123.774 rows=879662 loops
9. 0.003 0.092 ↑ 1.0 1 3

Hash (cost=14.44..14.44 rows=1 width=65) (actual time=0.092..0.092 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.045 0.089 ↑ 1.0 1 3

Nested Loop (cost=6.40..14.44 rows=1 width=65) (actual time=0.088..0.089 rows=1 loops=3)

  • -> Index Scan using idx_entity_uuid on entity e1 (cost=0.43..8.45 rows=1 width=49) (actual time=0.040..0.040 rows=1 loops=
11. 0.003 0.044 ↑ 1.0 1 3

HashAggregate (cost=5.97..5.98 rows=1 width=16) (actual time=0.044..0.044 rows=1 loops=3)

  • Group Key: acl.entity_id_uuid
  • Index Cond: (id_uuid = acl.entity_id_uuid)
12. 0.041 0.041 ↑ 1.0 1 3

Seq Scan on entity_acl acl (cost=0.00..5.97 rows=1 width=16) (actual time=0.041..0.041 rows=1 loops=3)

  • Filter: ((user_or_group_id = '1184936'::bigint) AND (account_type_id = 6))
  • Rows Removed by Filter: 197
13. 0.003 0.003 ↓ 0.0 0 2,638,986

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

  • Index Cond: (filler_id = oa.account_entity_id)
  • Filter: (process_template_id = ANY ('{89,112}'::bigint[]))
  • Rows Removed by Filter: 1
14. 3,579.099 3,579.099 ↑ 1.0 1 1,193,033

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

  • Index Cond: (id_uuid = p.filler_id_uuid)
15. 2,386.066 2,386.066 ↑ 1.0 1 1,193,033

Index Scan using idx_process_filler_id_uuid on process p2 (cost=0.56..5.17 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=1,193,033)

  • Index Cond: (filler_id_uuid = e1.id_uuid)
  • Filter: (workflow_state_id = ANY ('{264,265}'::bigint[]))
16. 11,930.330 11,930.330 ↑ 4.0 150 1,193,033

Seq Scan on workflow_state ws (cost=0.00..34.01 rows=601 width=23) (actual time=0.001..0.010 rows=150 loops=1,193,033)