explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1rck

Settings
# exclusive inclusive rows x rows loops node
1. 8,445.706 15,329.668 ↑ 1.3 11,807,637 1

Hash Right Join (cost=3,309.63..185,234.19 rows=15,291,698 width=4) (actual time=21.021..15,329.668 rows=11,807,637 loops=1)

  • Hash Cond: (l.store_id = s.id)
  • Filter: (((p."end" >= CURRENT_DATE) OR (p."end" IS NULL)) AND ((e."end" >= CURRENT_DATE) OR (e."end" IS NULL)))
  • Rows Removed by Filter: 5873366
2. 3,305.592 6,867.871 ↓ 1.3 17,663,223 1

Merge Left Join (cost=1,195.55..148,741.32 rows=13,093,208 width=16) (actual time=4.260..6,867.871 rows=17,663,223 loops=1)

  • Merge Cond: (l.group_id = p.group_id)
3. 6.205 18.256 ↑ 1.0 12,548 1

Merge Left Join (cost=1,195.12..1,392.10 rows=13,101 width=20) (actual time=4.235..18.256 rows=12,548 loops=1)

  • Merge Cond: (l.group_id = e.id)
4. 10.711 11.924 ↑ 1.0 12,548 1

Sort (cost=1,187.95..1,220.70 rows=13,101 width=16) (actual time=4.175..11.924 rows=12,548 loops=1)

  • Sort Key: l.group_id
  • Sort Method: quicksort Memory: 973kB
5. 1.213 1.213 ↑ 1.0 12,548 1

Seq Scan on group_store_link l (cost=0.00..292.01 rows=13,101 width=16) (actual time=0.020..1.213 rows=12,548 loops=1)

6. 0.098 0.127 ↑ 1.0 97 1

Sort (cost=7.17..7.41 rows=97 width=12) (actual time=0.055..0.127 rows=97 loops=1)

  • Sort Key: e.id
  • Sort Method: quicksort Memory: 29kB
7. 0.029 0.029 ↑ 1.0 97 1

Seq Scan on group_store e (cost=0.00..3.97 rows=97 width=12) (actual time=0.013..0.029 rows=97 loops=1)

8. 3,544.023 3,544.023 ↓ 5.5 17,664,192 1

Index Only Scan using idx_price_10 on price p (cost=0.43..99,417.24 rows=3,237,269 width=12) (actual time=0.021..3,544.023 rows=17,664,192 loops=1)

  • Heap Fetches: 5114959
9. 6.838 16.091 ↓ 1.0 30,328 1

Hash (cost=1,735.04..1,735.04 rows=30,323 width=12) (actual time=16.091..16.091 rows=30,328 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1678kB
10. 9.253 9.253 ↓ 1.0 30,328 1

Seq Scan on store s (cost=0.00..1,735.04 rows=30,323 width=12) (actual time=0.014..9.253 rows=30,328 loops=1)

  • Filter: (status >= 10)