explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m1qh

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.124 139.393 ↑ 7.2 244 1

Subquery Scan on om_relationship_types_supermap (cost=5,809.82..5,831.77 rows=1,756 width=251) (actual time=139.210..139.393 rows=244 loops=1)

2. 0.610 139.269 ↑ 7.2 244 1

Sort (cost=5,809.82..5,814.21 rows=1,756 width=301) (actual time=139.208..139.269 rows=244 loops=1)

  • Sort Key: ot.object_type, (min((ots.inheritance_path)::text))
  • Sort Method: quicksort Memory: 100kB
3. 0.328 138.659 ↑ 7.2 244 1

GroupAggregate (cost=5,623.00..5,715.19 rows=1,756 width=301) (actual time=138.264..138.659 rows=244 loops=1)

  • Group Key: ot.object_type, t.object_type, r.map_view, r.role_one, r.object_type_one, r.min_n_rels_one, r.max_n_rels_one, r.aggregate_view_one, r.role_two, r.object_type_two, r.min_n_rels_two, r.max_n_rels_two, r.aggregate_view_two
4. 0.739 138.331 ↑ 7.2 245 1

Sort (cost=5,623.00..5,627.39 rows=1,756 width=261) (actual time=138.255..138.331 rows=245 loops=1)

  • Sort Key: ot.object_type, t.object_type, r.map_view, r.role_one, r.object_type_one, r.min_n_rels_one, r.max_n_rels_one, r.aggregate_view_one, r.role_two, r.object_type_two, r.min_n_rels_two, r.max_n_rels_two, r.aggregate_view_two
  • Sort Method: quicksort Memory: 76kB
5. 0.340 137.592 ↑ 7.2 245 1

Merge Join (cost=0.49..5,528.37 rows=1,756 width=261) (actual time=0.704..137.592 rows=245 loops=1)

  • Merge Cond: ((t.object_type)::text = (r.object_type)::text)
6. 0.083 0.083 ↓ 1.0 133 1

Index Only Scan using om_object_types_pkey on om_object_types t (cost=0.14..26.02 rows=132 width=19) (actual time=0.009..0.083 rows=133 loops=1)

  • Heap Fetches: 133
7. 0.246 137.169 ↑ 7.2 245 1

Materialize (cost=0.14..5,481.46 rows=1,756 width=265) (actual time=0.687..137.169 rows=245 loops=1)

8. 130.294 136.923 ↑ 7.2 245 1

Nested Loop (cost=0.14..5,477.07 rows=1,756 width=265) (actual time=0.685..136.923 rows=245 loops=1)

  • Join Filter: (((ots.object_type)::text = ANY ((om_object_types__ancestors(ot.object_type))::text[])) OR ((ots.object_type)::text = ANY ((ot.adopts)::text[])))
  • Rows Removed by Join Filter: 11592
9. 1.776 3.158 ↑ 1.6 89 1

Nested Loop (cost=0.14..190.37 rows=139 width=246) (actual time=0.070..3.158 rows=89 loops=1)

  • Join Filter: (((ots.object_type)::text = (r.object_type_one)::text) OR ((ots.object_type)::text = (r.object_type_two)::text))
  • Rows Removed by Join Filter: 5896
10. 0.032 0.032 ↑ 1.6 45 1

Index Scan using om_relationship_types_ext_pkey on om_relationship_types_ext r (cost=0.14..17.02 rows=70 width=190) (actual time=0.003..0.032 rows=45 loops=1)

11. 1.305 1.350 ↓ 1.0 133 45

Materialize (cost=0.00..11.98 rows=132 width=56) (actual time=0.000..0.030 rows=133 loops=45)

12. 0.045 0.045 ↓ 1.0 133 1

Seq Scan on om_object_types ots (cost=0.00..11.32 rows=132 width=56) (actual time=0.005..0.045 rows=133 loops=1)

13. 3.376 3.471 ↓ 1.0 133 89

Materialize (cost=0.00..11.98 rows=132 width=32) (actual time=0.000..0.039 rows=133 loops=89)

14. 0.095 0.095 ↓ 1.0 133 1

Seq Scan on om_object_types ot (cost=0.00..11.32 rows=132 width=32) (actual time=0.002..0.095 rows=133 loops=1)

Planning time : 0.665 ms