explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KGP

Settings
# exclusive inclusive rows x rows loops node
1. 112.808 33,394.114 ↑ 12.8 678,245 1

Unique (cost=10,805,916.88..11,026,873.99 rows=8,690,545 width=4) (actual time=33,179.292..33,394.114 rows=678,245 loops=1)

2. 556.569 33,281.306 ↑ 54.5 811,090 1

Sort (cost=10,805,916.88..10,916,395.44 rows=44,191,421 width=4) (actual time=33,179.289..33,281.306 rows=811,090 loops=1)

  • Sort Key: o.id
  • Sort Method: external merge Disk: 11120kB
3. 104.329 32,724.737 ↑ 54.5 811,090 1

Nested Loop (cost=400.82..3,985,850.18 rows=44,191,421 width=4) (actual time=33.481..32,724.737 rows=811,090 loops=1)

4. 7.815 8.048 ↓ 1.0 1,034 1

Bitmap Heap Scan on locations l (cost=20.66..3,081.91 rows=1,017 width=4) (actual time=0.318..8.048 rows=1,034 loops=1)

  • Recheck Cond: (location_type_id = 2187)
  • Filter: (NOT deleted)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=432
5. 0.233 0.233 ↑ 1.0 1,035 1

Bitmap Index Scan on fki_location_type (cost=0.00..20.41 rows=1,065 width=0) (actual time=0.233..0.233 rows=1,035 loops=1)

  • Index Cond: (location_type_id = 2187)
6. 30,611.570 32,612.360 ↑ 55.4 784 1,034

Bitmap Heap Scan on cache_occurrences_functional o (cost=380.16..3,481.66 rows=43,453 width=41) (actual time=2.207..31.540 rows=784 loops=1,034)

  • Recheck Cond: (location_ids @> ARRAY[l.id])
  • Heap Blocks: exact=381391
7. 2,000.790 2,000.790 ↑ 34.4 1,265 1,034

Bitmap Index Scan on ix_cache_occurrences_functional_location_ids (cost=0.00..369.30 rows=43,453 width=0) (actual time=1.935..1.935 rows=1,265 loops=1,034)

  • Index Cond: (location_ids @> ARRAY[l.id])