explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D80D

Settings
# exclusive inclusive rows x rows loops node
1. 399.966 1,053.787 ↑ 1.3 135,757 1

GroupAggregate (cost=257,144.12..265,270.94 rows=171,091 width=172) (actual time=577.726..1,053.787 rows=135,757 loops=1)

  • Group Key: o.event_uid, o.date_from, o.organization_id, o.init_point_id, o.is_imported, o.is_fbs, o.autorepeat_hash
2. 360.465 653.821 ↓ 1.1 182,093 1

Sort (cost=257,144.12..257,571.85 rows=171,091 width=108) (actual time=577.675..653.821 rows=182,093 loops=1)

  • Sort Key: o.event_uid, o.date_from, o.organization_id, o.init_point_id, o.is_imported, o.is_fbs, o.autorepeat_hash
  • Sort Method: external merge Disk: 23,200kB
3. 50.675 293.356 ↓ 1.1 182,093 1

Hash Join (cost=24,412.72..232,329.04 rows=171,091 width=108) (actual time=51.988..293.356 rows=182,093 loops=1)

  • Hash Cond: (o.point_to_id = pt.id)
4. 65.261 224.209 ↓ 1.1 182,093 1

Hash Join (cost=22,477.55..229,944.71 rows=171,091 width=108) (actual time=33.198..224.209 rows=182,093 loops=1)

  • Hash Cond: (o.point_from_id = p.id)
5. 127.923 147.355 ↓ 1.1 182,093 1

Bitmap Heap Scan on org_schedule_calendar o (cost=20,542.39..227,560.38 rows=171,091 width=108) (actual time=21.208..147.355 rows=182,093 loops=1)

  • Recheck Cond: (date_from >= (CURRENT_TIMESTAMP - '7 days'::interval))
  • Filter: (is_active AND (event_uid IS NOT NULL) AND (init_point_id IS NOT NULL))
  • Heap Blocks: exact=11,827
6. 19.432 19.432 ↓ 1.1 182,093 1

Bitmap Index Scan on idx_org_schedule_calendar_date_from (cost=0.00..20,499.62 rows=171,091 width=0) (actual time=19.432..19.432 rows=182,093 loops=1)

  • Index Cond: (date_from >= (CURRENT_TIMESTAMP - '7 days'::interval))
7. 5.170 11.593 ↑ 1.0 35,385 1

Hash (cost=1,492.85..1,492.85 rows=35,385 width=8) (actual time=11.593..11.593 rows=35,385 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 1,895kB
8. 6.423 6.423 ↑ 1.0 35,385 1

Seq Scan on valid_point p (cost=0.00..1,492.85 rows=35,385 width=8) (actual time=0.008..6.423 rows=35,385 loops=1)

  • Filter: (NOT is_deleted)
9. 6.055 18.472 ↑ 1.0 35,385 1

Hash (cost=1,492.85..1,492.85 rows=35,385 width=8) (actual time=18.472..18.472 rows=35,385 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 1,895kB
10. 12.417 12.417 ↑ 1.0 35,385 1

Seq Scan on valid_point pt (cost=0.00..1,492.85 rows=35,385 width=8) (actual time=0.015..12.417 rows=35,385 loops=1)

  • Filter: (NOT is_deleted)
Planning time : 0.746 ms
Execution time : 1,069.649 ms