explain.depesz.com

PostgreSQL's explain analyze made readable

Result: imFp

Settings
# exclusive inclusive rows x rows loops node
1. 164,477.924 241,700.631 ↑ 2.9 30,226 1

GroupAggregate (cost=308,574.88..4,176,953.91 rows=86,754 width=47) (actual time=2,274.783..241,700.631 rows=30,226 loops=1)

  • Group Key: pe.gid_entity
2. 62,661.098 77,222.707 ↓ 2.0 221,163,793 1

Merge Join (cost=308,574.88..2,222,435.12 rows=111,600,034 width=183) (actual time=2,273.465..77,222.707 rows=221,163,793 loops=1)

  • Merge Cond: ((m.gid)::ltree = (pe.gid_entity)::ltree)
3. 1,583.622 1,583.622 ↑ 1.0 6,731,306 1

Index Only Scan using social_movie_gid_ac_idx on social_movie_ac m (cost=0.56..223,742.75 rows=6,731,306 width=37) (actual time=0.030..1,583.622 rows=6,731,306 loops=1)

  • Heap Fetches: 6731306
4. 12,019.223 12,977.987 ↓ 392.8 221,212,384 1

Sort (cost=308,543.96..309,951.72 rows=563,101 width=183) (actual time=2,273.430..12,977.987 rows=221,212,384 loops=1)

  • Sort Key: pe.gid_entity
  • Sort Method: quicksort Memory: 201988kB
5. 328.244 958.764 ↑ 1.0 562,204 1

Hash Join (cost=201,474.14..254,759.27 rows=563,101 width=183) (actual time=533.174..958.764 rows=562,204 loops=1)

  • Hash Cond: (pe.id_product = p.id)
6. 102.018 102.018 ↑ 1.6 530,012 1

Seq Scan on product_has_entity pe (cost=0.00..40,193.00 rows=852,700 width=53) (actual time=0.005..102.018 rows=530,012 loops=1)

  • Filter: active
7. 173.922 528.502 ↑ 1.0 531,384 1

Hash (cost=194,831.84..194,831.84 rows=531,384 width=146) (actual time=528.502..528.502 rows=531,384 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 101813kB
8. 354.580 354.580 ↑ 1.0 531,384 1

Seq Scan on product p (cost=0.00..194,831.84 rows=531,384 width=146) (actual time=0.006..354.580 rows=531,384 loops=1)

  • Filter: active
Planning time : 62.359 ms
Execution time : 241,719.530 ms