explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hkAU

Settings
# exclusive inclusive rows x rows loops node
1. 6.214 988.408 ↑ 1.0 1 1

Aggregate (cost=3,521,037.21..3,521,037.22 rows=1 width=32) (actual time=988.407..988.408 rows=1 loops=1)

2. 12.422 982.194 ↓ 100.0 100 1

GroupAggregate (cost=3,521,037.14..3,521,037.19 rows=1 width=64) (actual time=969.758..982.194 rows=100 loops=1)

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

Sort (cost=3,521,037.14..3,521,037.15 rows=1 width=472) (actual time=969.594..969.772 rows=2,900 loops=1)

  • Sort Key: (to_jsonb(o.*))
  • Sort Method: quicksort Memory: 1025kB
4. 10.294 966.896 ↓ 2,900.0 2,900 1

Nested Loop Left Join (cost=195.66..3,521,037.13 rows=1 width=472) (actual time=889.171..966.896 rows=2,900 loops=1)

5. 0.320 930.502 ↓ 2,900.0 2,900 1

Nested Loop (cost=195.66..3,520,822.74 rows=1 width=93) (actual time=889.099..930.502 rows=2,900 loops=1)

6. 2.071 927.282 ↓ 2,900.0 2,900 1

Nested Loop (cost=195.38..3,520,820.73 rows=1 width=95) (actual time=889.092..927.282 rows=2,900 loops=1)

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

Subquery Scan on o (cost=1.54..3,520,610.58 rows=100 width=89) (actual time=888.851..923.411 rows=100 loops=1)

8. 0.020 923.362 ↑ 1.0 100 1

Limit (cost=1.54..3,520,609.58 rows=100 width=223) (actual time=888.844..923.362 rows=100 loops=1)

9. 0.316 923.342 ↑ 482.5 100 1

WindowAgg (cost=1.54..1,698,798,995.64 rows=48,253 width=223) (actual time=888.843..923.342 rows=100 loops=1)

10. 0.000 920.026 ↑ 482.5 100 1

Nested Loop (cost=1.54..799,730.78 rows=48,253 width=79) (actual time=888.744..920.026 rows=100 loops=1)

11. 0.022 919.929 ↑ 482.5 100 1

Merge Append (cost=0.57..799,077.98 rows=48,253 width=79) (actual time=888.693..919.929 rows=100 loops=1)

  • Sort Key: objects_part.id
12. 0.004 0.004 ↓ 0.0 0 1

Index Scan using objects_part_pkey on objects_part (cost=0.12..8.01 rows=1 width=79) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: ((inserted >= '2019-01-01 00:00:00'::timestamp without time zone) AND (inserted <= '2020-01-01 00:00:00'::timestamp without time zone) AND (object_type_id = 781))
13. 919.903 919.903 ↑ 482.5 100 1

Index Scan using objects_part00_pkey on objects_part00 (cost=0.43..798,708.07 rows=48,252 width=79) (actual time=888.688..919.903 rows=100 loops=1)

  • Filter: ((inserted >= '2019-01-01 00:00:00'::timestamp without time zone) AND (inserted <= '2020-01-01 00:00:00'::timestamp without time zone) AND (object_type_id = 781))
  • Rows Removed by Filter: 3357800
14. 0.055 0.100 ↑ 1.0 1 100

Materialize (cost=0.97..49.64 rows=1 width=2) (actual time=0.001..0.001 rows=1 loops=100)

15. 0.001 0.045 ↑ 1.0 1 1

Nested Loop Semi Join (cost=0.97..49.63 rows=1 width=2) (actual time=0.044..0.045 rows=1 loops=1)

16. 0.015 0.015 ↑ 1.0 1 1

Index Only Scan using object_types_pkey on object_types ot (cost=0.28..4.29 rows=1 width=2) (actual time=0.014..0.015 rows=1 loops=1)

  • Index Cond: (id = 781)
  • Heap Fetches: 0
17. 0.002 0.029 ↑ 1.0 1 1

Nested Loop (cost=0.70..45.33 rows=1 width=8) (actual time=0.029..0.029 rows=1 loops=1)

18. 0.015 0.015 ↑ 4.5 2 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.014..0.015 rows=2 loops=1)

  • Index Cond: (username = 'AIPOVASZ'::text)
  • Heap Fetches: 0
19. 0.012 0.012 ↓ 0.0 0 2

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.006..0.006 rows=0 loops=2)

  • Index Cond: ((roleid = cr.roleid) AND (object_type_id = 781) AND (action = 'show'::text))
  • Heap Fetches: 0
20.          

SubPlan (for WindowAgg)

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

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

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

24. 0.200 0.200 ↑ 1.0 1 100

Index Scan using object_types_pkey on object_types ot_1 (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)
25. 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)

26. 0.400 0.400 ↑ 4.5 2 100

Index Only Scan using c_user_role_pkey on c_user_role cr_2 (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
27. 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_2 (cost=0.28..4.30 rows=1 width=10) (actual time=0.001..0.001 rows=0 loops=200)

  • Index Cond: ((roleid = cr_2.roleid) AND (object_type_id = objects_part.object_type_id) AND (action = 'show'::text))
  • Heap Fetches: 0
28. 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)

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

31. 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
32. 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
33. 0.000 1.100 ↑ 1.0 1 100

Aggregate (cost=3,479.56..3,479.57 rows=1 width=32) (actual time=0.011..0.011 rows=1 loops=100)

34. 0.000 1.100 ↓ 0.0 0 100

Subquery Scan on t_2 (cost=3,475.58..3,479.03 rows=106 width=74) (actual time=0.011..0.011 rows=0 loops=100)

35. 0.100 1.100 ↓ 0.0 0 100

GroupAggregate (cost=3,475.58..3,477.97 rows=106 width=82) (actual time=0.011..0.011 rows=0 loops=100)

  • Group Key: tree.id
36. 0.000 1.000 ↓ 0.0 0 100

Sort (cost=3,475.58..3,475.85 rows=106 width=419) (actual time=0.010..0.010 rows=0 loops=100)

  • Sort Key: tree.id
  • Sort Method: quicksort Memory: 25kB
37. 0.106 1.000 ↓ 0.0 0 100

Nested Loop (cost=1.00..3,472.02 rows=106 width=419) (actual time=0.010..0.010 rows=0 loops=100)

38. 0.500 0.500 ↑ 80.0 2 100

Index Scan using files_tree_parent_id_idx on files_tree tree (cost=0.56..56.59 rows=160 width=50) (actual time=0.004..0.005 rows=2 loops=100)

  • Index Cond: (parent_id = objects_part.id_folder)
39. 0.394 0.394 ↓ 0.0 0 197

Index Scan using files_parent_id_idx on files f (cost=0.44..20.99 rows=36 width=377) (actual time=0.002..0.002 rows=0 loops=197)

  • Index Cond: (parent_id = tree.id)
40. 0.000 0.200 ↑ 1.0 1 100

Aggregate (cost=31,647.69..31,647.70 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=100)

41. 0.200 0.200 ↓ 0.0 0 100

Index Scan using geom_data_numberarea on geom_data g (cost=0.56..18,691.07 rows=5,162 width=152) (actual time=0.002..0.002 rows=0 loops=100)

  • Index Cond: (numberarea = objects_part.numberarea)
42. 1.267 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)

43. 0.042 0.533 ↓ 163.0 326 1

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

44. 0.014 0.287 ↓ 34.0 34 1

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

45. 0.009 0.195 ↓ 39.0 39 1

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

46. 0.017 0.186 ↓ 75.0 75 1

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

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

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

48. 0.006 0.006 ↑ 1.5 6 1

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.005..0.006 rows=6 loops=1)

  • Index Cond: (username = 'AIPOVASZ'::text)
  • Heap Fetches: 0
49. 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_1.roleid) AND (action = 'show'::text) AND (object_type_id = 781))
  • Heap Fetches: 0
50. 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)
51. 0.204 0.204 ↓ 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.006 rows=10 loops=34)

  • Index Cond: (tep_id = t.id)
52. 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
53. 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)

54. 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))
55. 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))
56. 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))
57. 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))
58. 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))
59. 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))
60. 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 : 4.020 ms
Execution time : 988.678 ms