explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QnNj

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 12,415.638 ↓ 4.0 4 1

Limit (cost=393,347.83..393,347.83 rows=1 width=2,176) (actual time=12,415.633..12,415.638 rows=4 loops=1)

2. 0.067 12,415.633 ↓ 4.0 4 1

Sort (cost=393,347.83..393,347.83 rows=1 width=2,176) (actual time=12,415.631..12,415.633 rows=4 loops=1)

  • Sort Key: ctif.order_id
  • Sort Method: quicksort Memory: 27kB
3. 0.036 12,415.566 ↓ 4.0 4 1

Nested Loop (cost=3,719.93..393,347.82 rows=1 width=2,176) (actual time=12,340.989..12,415.566 rows=4 loops=1)

4. 0.067 12,415.462 ↓ 4.0 4 1

Nested Loop Left Join (cost=3,719.93..393,346.20 rows=1 width=1,612) (actual time=12,340.964..12,415.462 rows=4 loops=1)

  • Join Filter: (ct.task_comment_update_user_id = user_2.id)
  • Rows Removed by Join Filter: 428
5. 0.088 12,415.219 ↓ 4.0 4 1

Nested Loop Left Join (cost=3,719.93..393,336.79 rows=1 width=1,610) (actual time=12,340.906..12,415.219 rows=4 loops=1)

  • Join Filter: (ct.assigned_from_user_id = user_1.id)
  • Rows Removed by Join Filter: 424
6. 0.125 12,414.967 ↓ 4.0 4 1

Nested Loop Left Join (cost=3,719.93..393,327.38 rows=1 width=1,600) (actual time=12,340.899..12,414.967 rows=4 loops=1)

  • Join Filter: (ct.assigned_to_user_id = "user".id)
  • Rows Removed by Join Filter: 424
  • Filter: (((tt.id = 60) AND ("user".id = 101)) OR (tt.id <> 60))
7. 0.025 12,414.670 ↓ 4.0 4 1

Nested Loop Left Join (cost=3,719.93..393,317.17 rows=1 width=1,590) (actual time=12,340.848..12,414.670 rows=4 loops=1)

8. 594.788 12,414.589 ↓ 4.0 4 1

Hash Join (cost=3,719.51..393,316.69 rows=1 width=528) (actual time=12,340.821..12,414.589 rows=4 loops=1)

  • Hash Cond: (ct.id = ctif.current_task_id)
9. 1,945.783 11,819.751 ↓ 2.3 4,641,914 1

Hash Left Join (cost=3,715.50..385,592.43 rows=2,058,729 width=520) (actual time=82.052..11,819.751 rows=4,641,914 loops=1)

  • Hash Cond: (ct.urgency_status_type_id = urgency_status_type.id)
10. 1,946.454 9,873.939 ↓ 2.3 4,641,914 1

Hash Join (cost=3,714.43..357,283.84 rows=2,058,729 width=494) (actual time=81.993..9,873.939 rows=4,641,914 loops=1)

  • Hash Cond: (ct.task_type_id = tt.id)
11. 2,563.812 7,926.790 ↓ 2.3 4,641,914 1

Hash Join (cost=3,648.13..328,910.02 rows=2,058,729 width=409) (actual time=81.287..7,926.790 rows=4,641,914 loops=1)

  • Hash Cond: (ct.entity_id = en.entity_id)
12. 1,817.505 5,281.793 ↓ 2.3 4,641,914 1

Hash Join (cost=1.13..296,955.50 rows=2,058,729 width=306) (actual time=0.037..5,281.793 rows=4,641,914 loops=1)

  • Hash Cond: (ct.task_status_type_id = tst.id)
13. 3,464.276 3,464.276 ↑ 1.0 4,642,948 1

Seq Scan on current_task ct (cost=0.00..258,353.20 rows=4,803,700 width=270) (actual time=0.008..3,464.276 rows=4,642,948 loops=1)

  • Filter: is_visible
  • Rows Removed by Filter: 107
14. 0.001 0.012 ↑ 1.0 3 1

Hash (cost=1.10..1.10 rows=3 width=40) (actual time=0.012..0.012 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
15. 0.011 0.011 ↑ 1.0 3 1

Seq Scan on task_status_type tst (cost=0.00..1.10 rows=3 width=40) (actual time=0.009..0.011 rows=3 loops=1)

  • Filter: (id = ANY ('{1,3,7}'::integer[]))
  • Rows Removed by Filter: 4
16. 18.943 81.185 ↑ 1.0 27,105 1

Hash (cost=3,306.21..3,306.21 rows=27,263 width=119) (actual time=81.185..81.185 rows=27,105 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 4,161kB
17. 17.478 62.242 ↑ 1.0 27,105 1

Hash Join (cost=1,233.17..3,306.21 rows=27,263 width=119) (actual time=13.588..62.242 rows=27,105 loops=1)

  • Hash Cond: (e.id = en.entity_id)
18. 9.736 31.547 ↑ 1.0 27,105 1

Hash Join (cost=17.76..1,716.62 rows=27,212 width=101) (actual time=0.302..31.547 rows=27,105 loops=1)

  • Hash Cond: (e.legal_status_type_id = lst.id)
19. 10.356 21.606 ↓ 1.0 27,263 1

Hash Join (cost=3.12..1,329.41 rows=27,212 width=67) (actual time=0.089..21.606 rows=27,263 loops=1)

  • Hash Cond: (e.entity_type_id = et.id)
20. 11.195 11.195 ↓ 1.0 27,263 1

Seq Scan on entity e (cost=0.00..952.12 rows=27,212 width=41) (actual time=0.018..11.195 rows=27,263 loops=1)

21. 0.028 0.055 ↑ 1.0 50 1

Hash (cost=2.50..2.50 rows=50 width=30) (actual time=0.055..0.055 rows=50 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
22. 0.027 0.027 ↑ 1.0 50 1

Seq Scan on entity_type et (cost=0.00..2.50 rows=50 width=30) (actual time=0.010..0.027 rows=50 loops=1)

23. 0.107 0.205 ↑ 1.2 343 1

Hash (cost=9.28..9.28 rows=428 width=38) (actual time=0.205..0.205 rows=343 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
24. 0.098 0.098 ↑ 1.2 343 1

Seq Scan on legal_status_type lst (cost=0.00..9.28 rows=428 width=38) (actual time=0.011..0.098 rows=343 loops=1)

25. 5.928 13.217 ↑ 1.0 27,263 1

Hash (cost=874.63..874.63 rows=27,263 width=18) (actual time=13.217..13.217 rows=27,263 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,718kB
26. 7.289 7.289 ↑ 1.0 27,263 1

Seq Scan on entity_number en (cost=0.00..874.63 rows=27,263 width=18) (actual time=0.011..7.289 rows=27,263 loops=1)

27. 0.345 0.695 ↑ 1.0 1,080 1

Hash (cost=52.80..52.80 rows=1,080 width=89) (actual time=0.695..0.695 rows=1,080 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 145kB
28. 0.350 0.350 ↑ 1.0 1,080 1

Seq Scan on task_type tt (cost=0.00..52.80 rows=1,080 width=89) (actual time=0.006..0.350 rows=1,080 loops=1)

29. 0.011 0.029 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=30) (actual time=0.029..0.029 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
30. 0.018 0.018 ↑ 1.0 3 1

Seq Scan on urgency_status_type (cost=0.00..1.03 rows=3 width=30) (actual time=0.016..0.018 rows=3 loops=1)

31. 0.004 0.050 ↓ 4.0 4 1

Hash (cost=4.00..4.00 rows=1 width=16) (actual time=0.050..0.050 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
32. 0.046 0.046 ↓ 4.0 4 1

Seq Scan on current_task_inbox_folder ctif (cost=0.00..4.00 rows=1 width=16) (actual time=0.045..0.046 rows=4 loops=1)

  • Filter: (inbox_folder_id = 61)
  • Rows Removed by Filter: 171
33. 0.016 0.056 ↓ 0.0 0 4

Nested Loop (cost=0.42..0.47 rows=1 width=1,070) (actual time=0.014..0.014 rows=0 loops=4)

34. 0.040 0.040 ↓ 0.0 0 4

Index Scan using "ix$patent$entity" on patent p (cost=0.28..0.30 rows=1 width=1,044) (actual time=0.010..0.010 rows=0 loops=4)

  • Index Cond: (ct.entity_id = entity_id)
35. 0.000 0.000 ↓ 0.0 0

Index Scan using "pk$entity_type" on entity_type pt (cost=0.14..0.16 rows=1 width=30) (never executed)

  • Index Cond: (id = p.patent_type_id)
36. 0.172 0.172 ↑ 1.0 107 4

Seq Scan on "user" (cost=0.00..8.07 rows=107 width=18) (actual time=0.007..0.043 rows=107 loops=4)

37. 0.164 0.164 ↑ 1.0 107 4

Seq Scan on "user" user_1 (cost=0.00..8.07 rows=107 width=18) (actual time=0.004..0.041 rows=107 loops=4)

38. 0.176 0.176 ↑ 1.0 107 4

Seq Scan on "user" user_2 (cost=0.00..8.07 rows=107 width=18) (actual time=0.002..0.044 rows=107 loops=4)

39. 0.068 0.068 ↑ 1.0 1 4

Seq Scan on inbox_folder f (cost=0.00..1.60 rows=1 width=14) (actual time=0.015..0.017 rows=1 loops=4)

  • Filter: (id = 61)
  • Rows Removed by Filter: 47
Planning time : 43.274 ms
Execution time : 12,415.975 ms