explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8mzI

Settings
# exclusive inclusive rows x rows loops node
1. 5.824 151.565 ↑ 1.0 1 1

Aggregate (cost=1,211.65..1,211.66 rows=1 width=32) (actual time=151.564..151.565 rows=1 loops=1)

2. 12.144 145.741 ↓ 100.0 100 1

GroupAggregate (cost=1,211.58..1,211.63 rows=1 width=64) (actual time=133.595..145.741 rows=100 loops=1)

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

Sort (cost=1,211.58..1,211.58 rows=1 width=472) (actual time=133.425..133.597 rows=2,900 loops=1)

  • Sort Key: (to_jsonb(o.*))
  • Sort Method: quicksort Memory: 1010kB
4. 9.264 131.226 ↓ 2,900.0 2,900 1

Nested Loop Left Join (cost=194.81..1,211.57 rows=1 width=472) (actual time=86.464..131.226 rows=2,900 loops=1)

5. 0.240 95.862 ↓ 2,900.0 2,900 1

Nested Loop (cost=194.81..997.17 rows=1 width=93) (actual time=86.386..95.862 rows=2,900 loops=1)

6. 2.046 92.722 ↓ 2,900.0 2,900 1

Nested Loop (cost=194.53..995.16 rows=1 width=95) (actual time=86.378..92.722 rows=2,900 loops=1)

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

Subquery Scan on o (cost=0.69..785.01 rows=100 width=89) (actual time=86.107..88.876 rows=100 loops=1)

8. 0.012 88.831 ↑ 1.0 100 1

Limit (cost=0.69..784.01 rows=100 width=159) (actual time=86.093..88.831 rows=100 loops=1)

9. 0.058 88.819 ↑ 955.2 100 1

WindowAgg (cost=0.69..748,194.59 rows=95,516 width=159) (actual time=86.092..88.819 rows=100 loops=1)

10. 0.013 88.761 ↑ 955.2 100 1

Merge Append (cost=0.69..746,523.06 rows=95,516 width=71) (actual time=86.083..88.761 rows=100 loops=1)

  • Sort Key: objects_part.id
11. 0.004 0.004 ↓ 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.004..0.004 rows=0 loops=1)

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

Index Scan Backward using objects_part00_id_object_type_id_idx on objects_part00 (cost=0.56..745,798.68 rows=95,515 width=71) (actual time=86.077..88.744 rows=100 loops=1)

  • Index Cond: (object_type_id = 781)
13. 1.241 1.800 ↓ 163.0 326 100

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

14. 0.042 0.559 ↓ 163.0 326 1

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

15. 0.015 0.313 ↓ 34.0 34 1

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

16. 0.009 0.220 ↓ 39.0 39 1

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

17. 0.024 0.211 ↓ 75.0 75 1

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

  • Sort Key: t_1.tep_id
  • Sort Method: quicksort Memory: 28kB
18. 0.012 0.187 ↓ 75.0 75 1

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

19. 0.019 0.019 ↑ 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.018..0.019 rows=6 loops=1)

  • Index Cond: (username = 'AIPOVASZ'::text)
  • Heap Fetches: 0
20. 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
21. 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)
22. 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)
23. 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
24. 5.800 26.100 ↓ 0.0 0 2,900

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

25. 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))
26. 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))
27. 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))
28. 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))
29. 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))
30. 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))
31. 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 : 2.690 ms
Execution time : 151.752 ms