explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AqORI

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 518.241 ↑ 1.0 1 1

Limit (cost=34,144.91..34,144.92 rows=1 width=8) (actual time=518.240..518.241 rows=1 loops=1)

2. 0.006 518.239 ↑ 1.0 1 1

Aggregate (cost=34,144.91..34,144.92 rows=1 width=8) (actual time=518.239..518.239 rows=1 loops=1)

3. 0.036 518.233 ↓ 3.0 36 1

Nested Loop (cost=10,442.33..34,144.88 rows=12 width=0) (actual time=518.180..518.233 rows=36 loops=1)

  • Join Filter: (t1.user_id = t2.id)
  • Rows Removed by Join Filter: 151
4. 0.045 518.197 ↓ 3.0 36 1

Hash Join (cost=10,442.33..34,142.53 rows=12 width=16) (actual time=518.170..518.197 rows=36 loops=1)

  • Hash Cond: (t1.call_id = t0.id)
5. 10.608 264.594 ↓ 2.0 36 1

Seq Scan on call_interaction t1 (cost=0.00..23,700.15 rows=18 width=48) (actual time=264.578..264.594 rows=36 loops=1)

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

SubPlan (for Seq Scan)

7. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

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

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

11. 0.000 0.000 ↓ 0.0 0

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

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

13. 0.000 0.000 ↓ 0.0 0

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

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

16. 0.000 0.000 ↓ 0.0 0

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

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

18. 253.986 253.986 ↓ 1.5 30,508 1

Seq Scan on call call_interaction0_1 (cost=649.74..10,188.09 rows=20,339 width=16) (actual time=0.532..253.986 rows=30,508 loops=1)

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

SubPlan (for Seq Scan)

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

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

22. 0.000 0.000 ↓ 0.0 0

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

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

24. 0.000 0.000 ↓ 0.0 0

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

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

27. 0.000 0.000 ↓ 0.0 0

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

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

29. 7.982 253.558 ↓ 1.5 30,508 1

Hash (cost=10,188.09..10,188.09 rows=20,339 width=16) (actual time=253.558..253.558 rows=30,508 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,687kB
30. 245.576 245.576 ↓ 1.5 30,508 1

Seq Scan on call t0 (cost=649.74..10,188.09 rows=20,339 width=16) (actual time=0.119..245.576 rows=30,508 loops=1)

  • Filter: (lisa_super_user() OR ((hashed SubPlan 1) IS TRUE))
31.          

SubPlan (for Seq 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.000 0.000 ↑ 1.6 5 36

Materialize (cost=0.00..1.12 rows=8 width=16) (actual time=0.000..0.000 rows=5 loops=36)

42. 0.007 0.007 ↑ 1.0 8 1

Seq Scan on lisa_user t2 (cost=0.00..1.08 rows=8 width=16) (actual time=0.006..0.007 rows=8 loops=1)

Planning time : 1.007 ms
Execution time : 518.412 ms