explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KsizB

Settings
# exclusive inclusive rows x rows loops node
1. 0.167 36.317 ↑ 1.0 100 1

Limit (cost=74,671.47..74,683.14 rows=100 width=1,955) (actual time=32.579..36.317 rows=100 loops=1)

2. 8.271 36.150 ↑ 67.6 100 1

Gather Merge (cost=74,671.47..75,460.43 rows=6,762 width=1,955) (actual time=32.576..36.150 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.887 27.879 ↑ 56.4 60 3 / 3

Sort (cost=73,671.45..73,679.90 rows=3,381 width=1,955) (actual time=27.824..27.879 rows=60 loops=3)

  • Sort Key: event_metadata.server_version
  • Sort Method: top-N heapsort Memory: 287kB
  • Worker 0: Sort Method: top-N heapsort Memory: 226kB
  • Worker 1: Sort Method: top-N heapsort Memory: 240kB
4. 2.170 25.992 ↑ 5.2 646 3 / 3

Nested Loop (cost=240.24..73,542.23 rows=3,381 width=1,955) (actual time=0.719..25.992 rows=646 loops=3)

5. 2.641 19.946 ↑ 5.2 646 3 / 3

Nested Loop (cost=239.81..53,548.37 rows=3,381 width=16) (actual time=0.671..19.946 rows=646 loops=3)

6. 1.264 1.801 ↑ 5.2 646 3 / 3

Parallel Bitmap Heap Scan on client_metadata (cost=239.25..26,232.96 rows=3,340 width=37) (actual time=0.583..1.801 rows=646 loops=3)

  • Recheck Cond: (village_id = ANY ('{1584559556640,99060,99061,99062,99063,99064,99065,99066,99067,99068,99069,99070,99071,99072,99073,99074,99075,99076,99077,129494,100}'::bigint[]))
  • Heap Blocks: exact=78
7. 0.537 0.537 ↑ 4.1 1,938 1 / 3

Bitmap Index Scan on client_metadata_village_id_idx (cost=0.00..237.25 rows=8,015 width=0) (actual time=1.609..1.611 rows=1,938 loops=1)

  • Index Cond: (village_id = ANY ('{1584559556640,99060,99061,99062,99063,99064,99065,99066,99067,99068,99069,99070,99071,99072,99073,99074,99075,99076,99077,129494,100}'::bigint[]))
8. 15.504 15.504 ↑ 1.0 1 1,938 / 3

Index Scan using event_metadata_base_entity_id_index on event_metadata (cost=0.56..8.17 rows=1 width=53) (actual time=0.023..0.024 rows=1 loops=1,938)

  • Index Cond: ((base_entity_id)::text = (client_metadata.base_entity_id)::text)
  • Filter: (server_version >= 0)
9. 3.876 3.876 ↑ 1.0 1 1,938 / 3

Index Scan using event_pkey on event (cost=0.43..5.91 rows=1 width=1,947) (actual time=0.006..0.006 rows=1 loops=1,938)

  • Index Cond: (id = event_metadata.event_id)
Planning time : 0.837 ms
Execution time : 36.485 ms