explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8Owl

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 1,512.946 ↑ 2.5 40 1

Limit (cost=29,875.00..165,757.59 rows=100 width=140) (actual time=1,508.646..1,512.946 rows=40 loops=1)

2. 0.028 1,512.940 ↑ 11.8 40 1

Nested Loop Left Join (cost=29,875.00..671,240.81 rows=472 width=140) (actual time=1,508.645..1,512.940 rows=40 loops=1)

3. 0.025 1,512.872 ↑ 6.7 40 1

Nested Loop Left Join (cost=29,874.84..671,168.46 rows=269 width=136) (actual time=1,508.637..1,512.872 rows=40 loops=1)

4. 0.077 1,512.807 ↑ 6.1 40 1

Nested Loop (cost=29,874.69..671,102.83 rows=244 width=104) (actual time=1,508.623..1,512.807 rows=40 loops=1)

  • Join Filter: (t1.user_id = t2.id)
  • Rows Removed by Join Filter: 440
5. 0.010 0.010 ↑ 62.5 12 1

Seq Scan on lisa_user t2 (cost=0.00..17.50 rows=750 width=80) (actual time=0.008..0.010 rows=12 loops=1)

6. 0.045 1,512.720 ↑ 6.1 40 12

Materialize (cost=29,874.69..668,340.94 rows=244 width=56) (actual time=125.718..126.060 rows=40 loops=12)

7. 0.284 1,512.675 ↑ 6.1 40 1

Hash Join (cost=29,874.69..668,339.72 rows=244 width=56) (actual time=1,508.609..1,512.675 rows=40 loops=1)

  • Hash Cond: (t1.call_id = t0.id)
8. 260.731 607.634 ↑ 12.1 40 1

Seq Scan on call_interaction t1 (cost=0.00..638,463.76 rows=485 width=56) (actual time=603.588..607.634 rows=40 loops=1)

  • Filter: (alternatives: SubPlan 3 or hashed SubPlan 5)
9.          

SubPlan (for Seq Scan)

10. 0.000 0.000 ↓ 0.0 0

Index Scan using call_pkey on call call_interaction0 (cost=650.16..658.19 rows=1 width=0) (never executed)

  • Index Cond: (id = t1.call_id)
  • Filter: ((current_setting('lisa.groups'::text, true) ~~ '[""super_user""]'::text) OR ((hashed SubPlan 2) IS TRUE))
11.          

SubPlan (for Index Scan)

12. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.08..604.41 rows=18,133 width=16) (never executed)

  • Hash Cond: (((((unnest(regexp_match(t1_2.c1, '^team_(.+)'::text))))::character varying))::text = (t0_2.access_control_name)::text)
13. 0.000 0.000 ↓ 0.0 0

Result (cost=0.01..202.01 rows=10,000 width=32) (never executed)

14. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.01..52.01 rows=10,000 width=32) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Function Scan on json_array_elements_text t1_2 (cost=0.01..1.01 rows=100 width=32) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.07..54.07 rows=1,360 width=48) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26.88..54.07 rows=1,360 width=48) (never executed)

  • Hash Cond: (t2_2.ac_team_id = t0_2.id)
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team_membership t2_2 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.50..17.50 rows=750 width=48) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team t0_2 (cost=0.00..17.50 rows=750 width=48) (never executed)

21. 346.903 346.903 ↓ 2.0 435,837 1

Seq Scan on call call_interaction0_1 (cost=649.74..27,171.90 rows=216,223 width=16) (actual time=0.010..346.903 rows=435,837 loops=1)

  • Filter: ((current_setting('lisa.groups'::text, true) ~~ '[""super_user""]'::text) OR ((hashed SubPlan 4) IS TRUE))
22.          

SubPlan (for Seq Scan)

23. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.08..604.41 rows=18,133 width=16) (never executed)

  • Hash Cond: (((((unnest(regexp_match(t1_3.c1, '^team_(.+)'::text))))::character varying))::text = (t0_3.access_control_name)::text)
24. 0.000 0.000 ↓ 0.0 0

Result (cost=0.01..202.01 rows=10,000 width=32) (never executed)

25. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.01..52.01 rows=10,000 width=32) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Function Scan on json_array_elements_text t1_3 (cost=0.01..1.01 rows=100 width=32) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.07..54.07 rows=1,360 width=48) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26.88..54.07 rows=1,360 width=48) (never executed)

  • Hash Cond: (t2_3.ac_team_id = t0_3.id)
29. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team_membership t2_3 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.50..17.50 rows=750 width=48) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team t0_3 (cost=0.00..17.50 rows=750 width=48) (never executed)

32. 326.338 904.757 ↓ 2.0 435,837 1

Hash (cost=27,171.90..27,171.90 rows=216,223 width=16) (actual time=904.757..904.757 rows=435,837 loops=1)

  • Buckets: 524,288 (originally 262144) Batches: 1 (originally 1) Memory Usage: 24,526kB
33. 578.419 578.419 ↓ 2.0 435,837 1

Seq Scan on call t0 (cost=649.74..27,171.90 rows=216,223 width=16) (actual time=0.010..578.419 rows=435,837 loops=1)

  • Filter: ((current_setting('lisa.groups'::text, true) ~~ '[""super_user""]'::text) OR ((hashed SubPlan 1) IS TRUE))
34.          

SubPlan (for Seq Scan)

35. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.08..604.41 rows=18,133 width=16) (never executed)

  • Hash Cond: (((((unnest(regexp_match(t1_1.c1, '^team_(.+)'::text))))::character varying))::text = (t0_1.access_control_name)::text)
36. 0.000 0.000 ↓ 0.0 0

Result (cost=0.01..202.01 rows=10,000 width=32) (never executed)

37. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.01..52.01 rows=10,000 width=32) (never executed)

38. 0.000 0.000 ↓ 0.0 0

Function Scan on json_array_elements_text t1_1 (cost=0.01..1.01 rows=100 width=32) (never executed)

39. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.07..54.07 rows=1,360 width=48) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26.88..54.07 rows=1,360 width=48) (never executed)

  • Hash Cond: (t2_1.ac_team_id = t0_1.id)
41. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team_membership t2_1 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.50..17.50 rows=750 width=48) (never executed)

43. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team t0_1 (cost=0.00..17.50 rows=750 width=48) (never executed)

44. 0.040 0.040 ↓ 0.0 0 40

Index Scan using call_comment_pkey on call_comment t4 (cost=0.15..0.27 rows=1 width=48) (actual time=0.001..0.001 rows=0 loops=40)

  • Index Cond: (interaction_id = t1.id)
45. 0.040 0.040 ↑ 1.0 1 40

Index Scan using call_review_pkey on call_review t3 (cost=0.15..0.27 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=40)

  • Index Cond: (interaction_id = t1.id)
Planning time : 1.604 ms
Execution time : 1,513.322 ms