explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4q4Q

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 3,974.993 ↑ 2.5 40 1

Limit (cost=650.62..154,670.66 rows=100 width=140) (actual time=3,974.467..3,974.993 rows=40 loops=1)

2. 0.016 3,974.989 ↑ 15.6 40 1

Merge Left Join (cost=650.62..961,735.65 rows=624 width=140) (actual time=3,974.466..3,974.989 rows=40 loops=1)

  • Merge Cond: (t1.id = t3.interaction_id)
3. 0.016 3,974.964 ↑ 8.9 40 1

Merge Left Join (cost=650.47..961,653.30 rows=356 width=136) (actual time=3,974.461..3,974.964 rows=40 loops=1)

  • Merge Cond: (t1.id = t4.interaction_id)
4. 0.014 3,974.943 ↑ 8.1 40 1

Nested Loop (cost=650.31..961,582.39 rows=323 width=104) (actual time=3,974.455..3,974.943 rows=40 loops=1)

  • Join Filter: (t1.user_id = t2.id)
  • Rows Removed by Join Filter: 229
5. 0.036 3,974.889 ↑ 8.1 40 1

Nested Loop (cost=650.31..957,929.26 rows=323 width=56) (actual time=3,974.442..3,974.889 rows=40 loops=1)

6. 190.543 3,974.373 ↑ 12.1 40 1

Index Scan using call_interaction_pkey on call_interaction t1 (cost=0.15..638,744.41 rows=485 width=56) (actual time=3,974.352..3,974.373 rows=40 loops=1)

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

SubPlan (for Index Scan)

8. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id = t1.call_id)
  • Filter: (lisa_super_user() OR ((hashed SubPlan 2) IS TRUE))
9.          

SubPlan (for Index Scan)

10. 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)
11. 0.000 0.000 ↓ 0.0 0

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

12. 0.000 0.000 ↓ 0.0 0

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

13. 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)

14. 0.000 0.000 ↓ 0.0 0

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

15. 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)
16. 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)

17. 0.000 0.000 ↓ 0.0 0

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

18. 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)

19. 3,783.830 3,783.830 ↓ 1.5 434,482 1

Seq Scan on call call_interaction0_1 (cost=649.74..132,594.18 rows=286,863 width=16) (actual time=0.124..3,783.830 rows=434,482 loops=1)

  • Filter: (lisa_super_user() OR ((hashed SubPlan 4) IS TRUE))
20.          

SubPlan (for Seq Scan)

21. 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)
22. 0.000 0.000 ↓ 0.0 0

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

23. 0.000 0.000 ↓ 0.0 0

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

24. 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)

25. 0.000 0.000 ↓ 0.0 0

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

26. 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)
27. 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)

28. 0.000 0.000 ↓ 0.0 0

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

29. 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)

30. 0.480 0.480 ↑ 1.0 1 40

Index Scan using call_pkey on call t0 (cost=650.16..658.11 rows=1 width=16) (actual time=0.012..0.012 rows=1 loops=40)

  • Index Cond: (id = t1.call_id)
  • Filter: (lisa_super_user() OR ((hashed SubPlan 1) IS TRUE))
31.          

SubPlan (for Index Scan)

32. 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)
33. 0.000 0.000 ↓ 0.0 0

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

34. 0.000 0.000 ↓ 0.0 0

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

35. 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)

36. 0.000 0.000 ↓ 0.0 0

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

37. 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)
38. 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)

39. 0.000 0.000 ↓ 0.0 0

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

40. 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)

41. 0.032 0.040 ↑ 107.1 7 40

Materialize (cost=0.00..21.25 rows=750 width=80) (actual time=0.000..0.001 rows=7 loops=40)

42. 0.008 0.008 ↑ 62.5 12 1

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

43. 0.005 0.005 ↑ 133.8 8 1

Index Scan using call_comment_pkey on call_comment t4 (cost=0.15..64.20 rows=1,070 width=48) (actual time=0.004..0.005 rows=8 loops=1)

44. 0.009 0.009 ↑ 53.1 32 1

Index Scan using call_review_pkey on call_review t3 (cost=0.15..73.65 rows=1,700 width=20) (actual time=0.003..0.009 rows=32 loops=1)

Planning time : 1.061 ms
Execution time : 3,978.430 ms