explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E1fg

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,130.633 ↓ 0.0 141 1

Custom Scan (Citus Router) (cost=0.00..0.00 rows=0 width=0) (actual time=1,130.628..1,130.633 rows=141 loops=1)

  • Task Count: 1
  • Tasks Shown: All
  • -> Task
  • Node: host=ec2-3-91-129-165.compute-1.amazonaws.com port=5432 dbname=citus
  • Planning time: 0.486 ms
  • Execution time: 1202.664 ms
2. 0.000 1,200.238 ↑ 13.0 141 1

Finalize GroupAggregate (cost=38,219.47..38,465.46 rows=1,838 width=16) (actual time=1,168.870..1,200.238 rows=141 loops=1)

  • Group Key: meetings.company_user_id
3. 0.000 1,201.921 ↑ 4.2 418 1

Gather Merge (cost=38,219.47..38,438.27 rows=1,762 width=16) (actual time=1,168.708..1,201.921 rows=418 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 39.480 3,554.994 ↑ 6.3 139 3

Partial GroupAggregate (cost=37,219.45..37,234.87 rows=881 width=16) (actual time=1,161.496..1,184.998 rows=139 loops=3)

  • Group Key: meetings.company_user_id
5. 125.946 3,515.514 ↓ 60.6 53,355 3

Sort (cost=37,219.45..37,221.65 rows=881 width=8) (actual time=1,161.402..1,171.838 rows=53,355 loops=3)

  • Sort Key: meetings.company_user_id
  • Sort Method: quicksort Memory: 4323kB
6. 126.402 3,389.568 ↓ 60.6 53,355 3

Nested Loop (cost=5,379.07..37,176.35 rows=881 width=8) (actual time=89.921..1,129.856 rows=53,355 loops=3)

7. 1,221.458 1,287.414 ↓ 23.7 109,764 3

Parallel Bitmap Heap Scan on entity_associations_107725 entity_associations (cost=5,378.65..25,244.19 rows=4,624 width=16) (actual time=89.630..429.138 rows=109,764 loops=3)

  • Recheck Cond: ((company_id = 2928) AND (target_entity_type = ANY ('{3,21}'::integer[])) AND (source_entity_type = 27))
  • Heap Blocks: exact=34491
8. 65.956 65.956 ↓ 29.8 330,801 1

Bitmap Index Scan on entity_associations_target_to_source_107725 (cost=0.00..5,375.88 rows=11,097 width=0) (actual time=65.956..65.956 rows=330,801 loops=1)

  • Index Cond: ((company_id = 2928) AND (target_entity_type = ANY ('{3,21}'::integer[])) AND (source_entity_type = 27))
9. 1,975.752 1,975.752 ↓ 0.0 0 329,292

Index Scan using virtual_pkey_a_id_meetings_108749 on meetings_108749 meetings (cost=0.42..2.58 rows=1 width=24) (actual time=0.006..0.006 rows=0 loops=329,292)

  • Index Cond: (id = entity_associations.source_entity_id)
  • Filter: ((end_time >= '2017-08-04 00:00:00+00'::timestamp with time zone) AND (end_time <= '2018-09-04 23:59:59.999999+00'::timestamp with time zone) AND (company_id = 2928))
  • Rows Removed by Filter: 1