explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FMoC

Settings
# exclusive inclusive rows x rows loops node
1. 5.821 946.653 ↑ 1.0 1 1

Aggregate (cost=7,464.07..7,464.08 rows=1 width=32) (actual time=946.653..946.653 rows=1 loops=1)

2. 12.283 940.832 ↓ 100.0 100 1

GroupAggregate (cost=7,463.99..7,464.05 rows=1 width=64) (actual time=928.556..940.832 rows=100 loops=1)

  • Group Key: (to_jsonb(o.*))
3. 2.601 928.549 ↓ 2,900.0 2,900 1

Sort (cost=7,463.99..7,464.00 rows=1 width=472) (actual time=928.379..928.549 rows=2,900 loops=1)

  • Sort Key: (to_jsonb(o.*))
  • Sort Method: quicksort Memory: 1012kB
4. 9.744 925.948 ↓ 2,900.0 2,900 1

Nested Loop Left Join (cost=194.69..7,463.98 rows=1 width=472) (actual time=851.118..925.948 rows=2,900 loops=1)

5. 0.262 890.104 ↓ 2,900.0 2,900 1

Nested Loop (cost=194.69..7,249.59 rows=1 width=93) (actual time=851.048..890.104 rows=2,900 loops=1)

6. 2.116 886.942 ↓ 2,900.0 2,900 1

Nested Loop (cost=194.41..7,247.58 rows=1 width=95) (actual time=851.041..886.942 rows=2,900 loops=1)

  • Join Filter: (c.object_type_id = o.object_type_id)
  • Rows Removed by Join Filter: 29700
7. 0.044 883.026 ↑ 1.0 100 1

Subquery Scan on o (cost=0.57..7,037.43 rows=100 width=89) (actual time=850.800..883.026 rows=100 loops=1)

8. 0.017 882.982 ↑ 1.0 100 1

Limit (cost=0.57..7,036.43 rows=100 width=191) (actual time=850.794..882.982 rows=100 loops=1)

9. 0.166 882.965 ↑ 955.2 100 1

WindowAgg (cost=0.57..6,720,371.52 rows=95,516 width=191) (actual time=850.793..882.965 rows=100 loops=1)

10. 0.020 881.099 ↑ 955.2 100 1

Merge Append (cost=0.57..775,614.87 rows=95,516 width=71) (actual time=850.710..881.099 rows=100 loops=1)

  • Sort Key: objects_part.id
11. 0.005 0.005 ↓ 0.0 0 1

Index Scan using objects_part_pkey on objects_part (cost=0.12..8.00 rows=1 width=71) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: (object_type_id = 781)
12. 881.074 881.074 ↑ 955.1 100 1

Index Scan using objects_part00_pkey on objects_part00 (cost=0.43..774,890.48 rows=95,515 width=71) (actual time=850.704..881.074 rows=100 loops=1)

  • Filter: (object_type_id = 781)
  • Rows Removed by Filter: 3357800
13.          

SubPlan (for WindowAgg)

14. 0.000 1.700 ↑ 1.0 1 100

Aggregate (cost=62.21..62.22 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=100)

15. 0.100 1.700 ↓ 0.0 0 100

Nested Loop (cost=10.16..62.20 rows=2 width=98) (actual time=0.017..0.017 rows=0 loops=100)

16. 0.000 1.000 ↑ 1.0 1 100

Nested Loop Semi Join (cost=0.97..52.96 rows=1 width=98) (actual time=0.010..0.010 rows=1 loops=100)

17. 0.200 0.200 ↑ 1.0 1 100

Index Scan using object_types_pkey on object_types ot (cost=0.28..8.29 rows=1 width=100) (actual time=0.001..0.002 rows=1 loops=100)

  • Index Cond: (id = objects_part.object_type_id)
18. 0.200 0.800 ↑ 1.0 1 100

Nested Loop (cost=0.70..44.66 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=100)

19. 0.400 0.400 ↑ 4.5 2 100

Index Only Scan using c_user_role_pkey on c_user_role cr_1 (cost=0.42..4.58 rows=9 width=2) (actual time=0.004..0.004 rows=2 loops=100)

  • Index Cond: (username = 'AIPOVASZ'::text)
  • Heap Fetches: 0
20. 0.200 0.200 ↓ 0.0 0 200

Index Only Scan using c_role_objtype_roleid_object_type_id_action_key on c_role_objtype c_1 (cost=0.28..4.30 rows=1 width=10) (actual time=0.001..0.001 rows=0 loops=200)

  • Index Cond: ((roleid = cr_1.roleid) AND (object_type_id = objects_part.object_type_id) AND (action = 'show'::text))
  • Heap Fetches: 0
21. 0.000 0.600 ↓ 0.0 0 100

Unique (cost=9.18..9.20 rows=2 width=8) (actual time=0.006..0.006 rows=0 loops=100)

22. 0.100 0.600 ↓ 0.0 0 100

Sort (cost=9.18..9.19 rows=2 width=8) (actual time=0.006..0.006 rows=0 loops=100)

  • Sort Key: c_obj_object.master_id
  • Sort Method: quicksort Memory: 25kB
23. 0.100 0.500 ↓ 0.0 0 100

Append (cost=0.56..9.17 rows=2 width=8) (actual time=0.005..0.005 rows=0 loops=100)

24. 0.300 0.300 ↓ 0.0 0 100

Index Only Scan using c_obj_object_master_id_slave_id_role_key on c_obj_object (cost=0.56..4.58 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=100)

  • Index Cond: ((master_id = objects_part.id) AND (slave_id = objects_part.id))
  • Heap Fetches: 0
25. 0.100 0.100 ↓ 0.0 0 100

Index Only Scan using c_obj_object_master_id_slave_id_role_key on c_obj_object c_obj_object_1 (cost=0.56..4.58 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=100)

  • Index Cond: ((master_id = objects_part.id) AND (slave_id = objects_part.id))
  • Heap Fetches: 0
26. 1.276 1.800 ↓ 163.0 326 100

Materialize (cost=193.84..207.15 rows=2 width=16) (actual time=0.002..0.018 rows=326 loops=100)

27. 0.067 0.524 ↓ 163.0 326 1

Nested Loop (cost=193.84..207.14 rows=2 width=16) (actual time=0.229..0.524 rows=326 loops=1)

28. 0.014 0.287 ↓ 34.0 34 1

Nested Loop (cost=193.56..201.59 rows=1 width=16) (actual time=0.194..0.287 rows=34 loops=1)

29. 0.008 0.195 ↓ 39.0 39 1

Unique (cost=193.27..193.28 rows=1 width=8) (actual time=0.183..0.195 rows=39 loops=1)

30. 0.018 0.187 ↓ 75.0 75 1

Sort (cost=193.27..193.28 rows=1 width=8) (actual time=0.182..0.187 rows=75 loops=1)

  • Sort Key: t_1.tep_id
  • Sort Method: quicksort Memory: 28kB
31. 0.007 0.169 ↓ 75.0 75 1

Nested Loop (cost=0.84..193.26 rows=1 width=8) (actual time=0.123..0.169 rows=75 loops=1)

32. 0.006 0.006 ↑ 1.5 6 1

Index Only Scan using c_user_role_pkey on c_user_role cr (cost=0.42..4.58 rows=9 width=2) (actual time=0.005..0.006 rows=6 loops=1)

  • Index Cond: (username = 'AIPOVASZ'::text)
  • Heap Fetches: 0
33. 0.156 0.156 ↓ 12.0 12 6

Index Only Scan using c_role_teps_roleid_tep_id_action_object_type_id_key on c_role_teps t_1 (cost=0.42..20.96 rows=1 width=10) (actual time=0.024..0.026 rows=12 loops=6)

  • Index Cond: ((roleid = cr.roleid) AND (action = 'show'::text) AND (object_type_id = 781))
  • Heap Fetches: 0
34. 0.078 0.078 ↑ 1.0 1 39

Index Scan using obj_teps_pkey on obj_teps t (cost=0.29..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=39)

  • Index Cond: (id = t_1.tep_id)
35. 0.170 0.170 ↓ 5.0 10 34

Index Scan using c_objtype_tep_tep_id on c_objtype_tep c (cost=0.29..5.53 rows=2 width=12) (actual time=0.002..0.005 rows=10 loops=34)

  • Index Cond: (tep_id = t.id)
36. 2.900 2.900 ↑ 1.0 1 2,900

Index Only Scan using obj_tep_category_pkey on obj_tep_category ct (cost=0.28..2.01 rows=1 width=2) (actual time=0.001..0.001 rows=1 loops=2,900)

  • Index Cond: (id = t.category_id)
  • Heap Fetches: 0
37. 5.800 26.100 ↓ 0.0 0 2,900

Append (cost=0.00..213.45 rows=94 width=445) (actual time=0.008..0.009 rows=0 loops=2,900)

38. 0.000 0.000 ↓ 0.0 0 2,900

Seq Scan on objtep_part (cost=0.00..0.00 rows=1 width=888) (actual time=0.000..0.000 rows=0 loops=2,900)

  • Filter: ((object_id = o.id) AND (tep_id = t.id))
39. 5.800 5.800 ↓ 0.0 0 2,900

Index Scan using objtep_part00_object_id_tep_id_key on objtep_part00 (cost=0.57..8.59 rows=1 width=521) (actual time=0.002..0.002 rows=0 loops=2,900)

  • Index Cond: ((object_id = o.id) AND (tep_id = t.id))
40. 2.900 2.900 ↓ 0.0 0 2,900

Index Scan using objtep_part01_object_id_tep_id_key on objtep_part01 (cost=0.56..16.50 rows=4 width=886) (actual time=0.001..0.001 rows=0 loops=2,900)

  • Index Cond: ((object_id = o.id) AND (tep_id = t.id))
41. 2.900 2.900 ↓ 0.0 0 2,900

Index Scan using objtep_part02_object_id_tep_id_key on objtep_part02 (cost=0.57..54.85 rows=24 width=169) (actual time=0.001..0.001 rows=0 loops=2,900)

  • Index Cond: ((object_id = o.id) AND (tep_id = t.id))
42. 2.900 2.900 ↓ 0.0 0 2,900

Index Scan using objtep_part03_object_id_tep_id_key on objtep_part03 (cost=0.56..27.93 rows=12 width=138) (actual time=0.001..0.001 rows=0 loops=2,900)

  • Index Cond: ((object_id = o.id) AND (tep_id = t.id))
43. 2.900 2.900 ↓ 0.0 0 2,900

Index Scan using objtep_part04_object_id_tep_id_key on objtep_part04 (cost=0.57..91.22 rows=48 width=809) (actual time=0.001..0.001 rows=0 loops=2,900)

  • Index Cond: ((object_id = o.id) AND (tep_id = t.id))
44. 2.900 2.900 ↓ 0.0 0 2,900

Index Scan using objtep_part05_object_id_tep_id_key on objtep_part05 (cost=0.56..14.37 rows=4 width=138) (actual time=0.001..0.001 rows=0 loops=2,900)

  • Index Cond: ((object_id = o.id) AND (tep_id = t.id))
Planning time : 3.087 ms
Execution time : 946.873 ms