explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wZFD

Settings
# exclusive inclusive rows x rows loops node
1. 417.470 1,286.864 ↑ 1.4 81,274 1

GroupAggregate (cost=207,342.20..213,527.39 rows=112,458 width=221) (actual time=854.786..1,286.864 rows=81,274 loops=1)

  • Output: o.event_uid, o.chain_hash, o.init_point_id, timezone('UTC'::text, o.date_from), (timezone('MSK'::text, o.date_from))::time without time zone, array_agg(DISTINCT o.point_from_id), array_agg(DISTINCT o.point_to_id), o.organization_id, min(o.created_at), max(o.updated_at), o.is_imported, o.is_fbs, o.autorepeat_hash, o.date_from
  • Group Key: o.event_uid, o.chain_hash, o.date_from, o.organization_id, o.init_point_id, o.is_imported, o.is_fbs, o.autorepeat_hash
  • Buffers: shared hit=13,386
2. 478.134 869.394 ↑ 1.0 108,158 1

Sort (cost=207,342.20..207,623.34 rows=112,458 width=157) (actual time=854.681..869.394 rows=108,158 loops=1)

  • Output: o.event_uid, o.chain_hash, o.init_point_id, o.organization_id, o.is_imported, o.is_fbs, o.autorepeat_hash, o.date_from, o.point_from_id, o.point_to_id, o.created_at, o.updated_at
  • Sort Key: o.event_uid, o.chain_hash, o.date_from, o.organization_id, o.init_point_id, o.is_imported, o.is_fbs, o.autorepeat_hash
  • Sort Method: quicksort Memory: 31,802kB
  • Buffers: shared hit=13,386
3. 49.029 391.260 ↑ 1.0 108,158 1

Hash Join (cost=16,686.87..197,907.52 rows=112,458 width=157) (actual time=103.976..391.260 rows=108,158 loops=1)

  • Output: o.event_uid, o.chain_hash, o.init_point_id, o.organization_id, o.is_imported, o.is_fbs, o.autorepeat_hash, o.date_from, o.point_from_id, o.point_to_id, o.created_at, o.updated_at
  • Inner Unique: true
  • Hash Cond: (o.point_to_id = pt.id)
  • Buffers: shared hit=13,386
4. 61.544 298.345 ↑ 1.0 108,158 1

Hash Join (cost=14,419.43..195,344.85 rows=112,458 width=157) (actual time=59.403..298.345 rows=108,158 loops=1)

  • Output: o.event_uid, o.chain_hash, o.init_point_id, o.date_from, o.point_from_id, o.point_to_id, o.organization_id, o.created_at, o.updated_at, o.is_imported, o.is_fbs, o.autorepeat_hash
  • Inner Unique: true
  • Hash Cond: (o.point_from_id = p.id)
  • Buffers: shared hit=12,247
5. 181.439 211.199 ↑ 1.0 108,158 1

Bitmap Heap Scan on public.org_schedule_calendar o (cost=12,151.98..192,782.19 rows=112,458 width=157) (actual time=32.830..211.199 rows=108,158 loops=1)

  • Output: o.id, o.org_schedule_id, o.organization_id, o.point_from_id, o.point_to_id, o.date_from, o.date_to, o.created_at, o.updated_at, o.is_deleted, o.is_generated, o.is_imported, o.import_uid, o.point_from_lozon_id, o.point_to_lozon_id, o.organization_lozon_contract_id, o.is_active, o.event_uid, o.chain_hash, o.init_point_id, o.is_fbs, o.autorepeat_hash
  • Recheck Cond: (o.date_from >= (CURRENT_TIMESTAMP + '5 days'::interval))
  • Filter: (o.is_active AND (o.event_uid IS NOT NULL) AND (o.init_point_id IS NOT NULL))
  • Heap Blocks: exact=10,281
  • Buffers: shared hit=11,108
6. 29.760 29.760 ↑ 1.0 108,158 1

Bitmap Index Scan on idx_org_schedule_calendar_date_from (cost=0.00..12,123.87 rows=112,458 width=0) (actual time=29.759..29.760 rows=108,158 loops=1)

  • Index Cond: (o.date_from >= (CURRENT_TIMESTAMP + '5 days'::interval))
  • Buffers: shared hit=827
7. 13.621 25.602 ↑ 1.4 35,804 1

Hash (cost=1,640.53..1,640.53 rows=50,153 width=8) (actual time=25.602..25.602 rows=35,804 loops=1)

  • Output: p.id
  • Buckets: 65,536 Batches: 1 Memory Usage: 1,911kB
  • Buffers: shared hit=1,139
8. 11.981 11.981 ↑ 1.4 35,804 1

Seq Scan on views.valid_point p (cost=0.00..1,640.53 rows=50,153 width=8) (actual time=0.018..11.981 rows=35,804 loops=1)

  • Output: p.id
  • Filter: (NOT p.is_deleted)
  • Buffers: shared hit=1,139
9. 14.130 43.886 ↑ 1.4 35,804 1

Hash (cost=1,640.53..1,640.53 rows=50,153 width=8) (actual time=43.886..43.886 rows=35,804 loops=1)

  • Output: pt.id
  • Buckets: 65,536 Batches: 1 Memory Usage: 1,911kB
  • Buffers: shared hit=1,139
10. 29.756 29.756 ↑ 1.4 35,804 1

Seq Scan on views.valid_point pt (cost=0.00..1,640.53 rows=50,153 width=8) (actual time=0.038..29.756 rows=35,804 loops=1)

  • Output: pt.id
  • Filter: (NOT pt.is_deleted)
  • Buffers: shared hit=1,139
Planning time : 1.924 ms
Execution time : 1,300.542 ms