explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cYn1

Settings
# exclusive inclusive rows x rows loops node
1. 0.920 1,232.771 ↑ 1.4 1,756 1

Subquery Scan on om_attributes_supermap (cost=9,945.83..9,976.52 rows=2,455 width=779) (actual time=1,231.401..1,232.771 rows=1,756 loops=1)

2. 3.565 1,231.851 ↑ 1.4 1,756 1

Sort (cost=9,945.83..9,951.97 rows=2,455 width=942) (actual time=1,231.399..1,231.851 rows=1,756 loops=1)

  • Sort Key: ot.object_type, ((array_agg(oa.sort_weight))[cardinality(array_agg(oa.sort_weight))]) DESC, (max(oa.overriding_count))
  • Sort Method: quicksort Memory: 508kB
3. 5.146 1,228.286 ↑ 1.4 1,756 1

GroupAggregate (cost=9,592.78..9,807.60 rows=2,455 width=942) (actual time=1,222.645..1,228.286 rows=1,756 loops=1)

  • Group Key: ot.object_type, oa.attribute_name, oa.pretty_name, oa.pretty_plural, oa.datatype, oa.is_static, oa.is_unique, oa.foreign_key, oa.comment
4. 5.051 1,223.140 ↑ 1.4 1,756 1

Sort (cost=9,592.78..9,598.92 rows=2,455 width=854) (actual time=1,222.624..1,223.140 rows=1,756 loops=1)

  • Sort Key: ot.object_type, oa.attribute_name, oa.pretty_name, oa.pretty_plural, oa.datatype, oa.is_static, oa.is_unique, oa.foreign_key, oa.comment
  • Sort Method: quicksort Memory: 435kB
5. 1.140 1,218.089 ↑ 1.4 1,756 1

Hash Join (cost=8.39..9,454.55 rows=2,455 width=854) (actual time=0.275..1,218.089 rows=1,756 loops=1)

  • Hash Cond: ((ots.object_type)::text = (oa.object_type)::text)
6. 1,208.437 1,216.741 ↑ 4.2 392 1

Nested Loop (cost=0.00..9,388.37 rows=1,662 width=86) (actual time=0.058..1,216.741 rows=392 loops=1)

  • Join Filter: (((ots.object_type)::text = ANY ((om_object_types__ancestors(ot.object_type))::text[])) OR ((ots.object_type)::text = ANY ((om_object_types__ancestors_adopt(ot.object_type))::text[])))
  • Rows Removed by Join Filter: 17297
7. 0.058 0.058 ↓ 1.0 133 1

Seq Scan on om_object_types ot (cost=0.00..11.32 rows=132 width=19) (actual time=0.005..0.058 rows=133 loops=1)

8. 8.186 8.246 ↓ 1.0 133 133

Materialize (cost=0.00..11.98 rows=132 width=67) (actual time=0.000..0.062 rows=133 loops=133)

9. 0.060 0.060 ↓ 1.0 133 1

Seq Scan on om_object_types ots (cost=0.00..11.32 rows=132 width=67) (actual time=0.002..0.060 rows=133 loops=1)

10. 0.115 0.208 ↓ 1.0 202 1

Hash (cost=5.95..5.95 rows=195 width=782) (actual time=0.208..0.208 rows=202 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
11. 0.093 0.093 ↓ 1.0 202 1

Seq Scan on om_attributes oa (cost=0.00..5.95 rows=195 width=782) (actual time=0.003..0.093 rows=202 loops=1)

Planning time : 0.715 ms