explain.depesz.com

PostgreSQL's explain analyze made readable

Result: s6mZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 83,697.160 ↑ 2.3 6 1

Sort (cost=17,548,035.27..17,548,035.31 rows=14 width=251) (actual time=83,697.160..83,697.160 rows=6 loops=1)

  • Sort Key: (CASE WHEN ((cr_items.content_type)::text = 'content_folder'::text) THEN cr_folders.label WHEN ((cr_items.content_type)::text = 'content_extlink'::text) THEN cr_extlinks.label ELSE cr_items.name END)
  • Sort Method: quicksort Memory: 26kB
2. 15,137.680 83,697.142 ↑ 2.3 6 1

Nested Loop Semi Join (cost=0.00..17,548,035.01 rows=14 width=251) (actual time=13,927.191..83,697.142 rows=6 loops=1)

  • Join Filter: (cr_items.item_id = c.object_id)
3. 0.014 0.174 ↑ 2.3 6 1

Nested Loop Left Join (cost=0.00..182.07 rows=14 width=255) (actual time=0.033..0.174 rows=6 loops=1)

4. 0.007 0.142 ↑ 2.3 6 1

Nested Loop Left Join (cost=0.00..150.65 rows=14 width=182) (actual time=0.029..0.142 rows=6 loops=1)

5. 0.010 0.099 ↑ 2.3 6 1

Nested Loop Left Join (cost=0.00..115.57 rows=14 width=147) (actual time=0.023..0.099 rows=6 loops=1)

6. 0.010 0.089 ↑ 2.3 6 1

Nested Loop Left Join (cost=0.00..111.65 rows=14 width=127) (actual time=0.023..0.089 rows=6 loops=1)

7. 0.015 0.079 ↑ 2.3 6 1

Nested Loop (cost=0.00..68.40 rows=14 width=86) (actual time=0.023..0.079 rows=6 loops=1)

8. 0.016 0.016 ↑ 2.3 6 1

Index Scan using cr_items_by_parent_id on cr_items (cost=0.00..12.53 rows=14 width=74) (actual time=0.013..0.016 rows=6 loops=1)

  • Index Cond: (parent_id = 134750901)
9. 0.048 0.048 ↑ 1.0 1 6

Index Scan using acs_objects_pk on acs_objects (cost=0.00..3.98 rows=1 width=12) (actual time=0.007..0.008 rows=1 loops=6)

  • Index Cond: (acs_objects.object_id = cr_items.item_id)
10. 0.000 0.000 ↓ 0.0 0 6

Index Scan using cr_revisions_pk on cr_revisions (cost=0.00..3.08 rows=1 width=45) (actual time=0.000..0.000 rows=0 loops=6)

  • Index Cond: (cr_items.live_revision = cr_revisions.revision_id)
11. 0.000 0.000 ↓ 0.0 0 6

Index Scan using cr_mime_types_pk on cr_mime_types (cost=0.00..0.27 rows=1 width=43) (actual time=0.000..0.000 rows=0 loops=6)

  • Index Cond: ((cr_revisions.mime_type)::text = (cr_mime_types.mime_type)::text)
12. 0.036 0.036 ↑ 1.0 1 6

Index Scan using cr_folders_pk on cr_folders (cost=0.00..2.49 rows=1 width=39) (actual time=0.004..0.006 rows=1 loops=6)

  • Index Cond: (cr_items.item_id = cr_folders.folder_id)
13. 0.018 0.018 ↓ 0.0 0 6

Index Scan using cr_extlinks_pk on cr_extlinks (cost=0.00..2.23 rows=1 width=77) (actual time=0.003..0.003 rows=0 loops=6)

  • Index Cond: (cr_items.item_id = cr_extlinks.extlink_id)
14. 25,052.244 68,559.036 ↑ 147.4 49,733,580 6

Nested Loop (cost=0.00..3,159,648.39 rows=7,332,549,769 width=4) (actual time=0.031..11,426.506 rows=49,733,580 loops=6)

15. 0.024 0.192 ↑ 72,077.0 4 6

Nested Loop (cost=0.00..43,306.86 rows=288,308 width=4) (actual time=0.025..0.032 rows=4 loops=6)

  • Join Filter: ((p.privilege)::text = (pdm.privilege)::text)
16. 0.024 0.024 ↑ 2.0 1 6

Index Scan using acs_priv_desc_map_idx on acs_privilege_descendant_map pdm (cost=0.00..3.32 rows=2 width=11) (actual time=0.004..0.004 rows=1 loops=6)

  • Index Cond: ((descendant)::text = 'read'::text)
17. 0.012 0.144 ↑ 90,145.4 17 6

Nested Loop (cost=0.00..2,495.87 rows=1,532,472 width=12) (actual time=0.019..0.024 rows=17 loops=6)

18. 0.042 0.042 ↑ 89.0 1 6

Index Scan using party_member_member_idx on party_approved_member_map pamm (cost=0.00..51.62 rows=89 width=4) (actual time=0.007..0.007 rows=1 loops=6)

  • Index Cond: (member_id = 133449130)
19. 0.090 0.090 ↑ 1.6 17 6

Index Scan using acs_permissions_grantee_idx on acs_permissions p (cost=0.00..27.13 rows=27 width=16) (actual time=0.010..0.015 rows=17 loops=6)

  • Index Cond: (p.grantee_id = pamm.party_id)
20. 43,506.600 43,506.600 ↓ 96,382.9 12,433,395 24

Index Scan using acs_obj_ctx_idx_ancestor_idx on acs_object_context_index c (cost=0.00..9.20 rows=129 width=8) (actual time=0.005..1,812.775 rows=12,433,395 loops=24)

  • Index Cond: (c.ancestor_id = p.object_id)
21.          

SubPlan (for Nested Loop Semi Join)

22. 0.162 0.252 ↑ 1.0 1 6

Aggregate (cost=70,343.82..70,343.83 rows=1 width=0) (actual time=0.042..0.042 rows=1 loops=6)

23. 0.090 0.090 ↓ 0.0 0 6

Index Scan using cr_items_tree_sortkey_un on cr_items ci2 (cost=0.25..70,141.62 rows=80,879 width=0) (actual time=0.015..0.015 rows=0 loops=6)

  • Index Cond: ((tree_sortkey >= $0) AND (tree_sortkey <= tree_right($0)))
  • Filter: ((content_type)::text <> 'content_folder'::text)
Total runtime : 83,697.282 ms