explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oUxk

Settings
# exclusive inclusive rows x rows loops node
1. 0.133 493.693 ↑ 2.2 138 1

Nested Loop (cost=1,350,822.08..1,353,677.88 rows=307 width=1,025) (actual time=489.022..493.693 rows=138 loops=1)

2.          

CTE dates_agg

3. 0.114 489.285 ↑ 2.2 138 1

Finalize GroupAggregate (cost=1,350,784.13..1,350,821.23 rows=307 width=36) (actual time=488.893..489.285 rows=138 loops=1)

  • Group Key: dates.listing_id
  • Filter: (count(*) = 6)
  • Rows Removed by Filter: 80
4. 0.000 489.171 ↑ 1.2 218 1

Gather Merge (cost=1,350,784.13..1,350,816.24 rows=256 width=44) (actual time=488.884..489.171 rows=218 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 0.309 1,446.072 ↑ 1.8 73 3

Partial GroupAggregate (cost=1,349,784.11..1,349,786.67 rows=128 width=44) (actual time=481.882..482.024 rows=73 loops=3)

  • Group Key: dates.listing_id
6. 1.191 1,445.763 ↓ 2.7 342 3

Sort (cost=1,349,784.11..1,349,784.43 rows=128 width=9) (actual time=481.872..481.921 rows=342 loops=3)

  • Sort Key: dates.listing_id
  • Sort Method: quicksort Memory: 46kB
7. 1.872 1,444.572 ↓ 2.7 342 3

Nested Loop (cost=0.57..1,349,779.63 rows=128 width=9) (actual time=6.934..481.524 rows=342 loops=3)

8. 402.540 402.540 ↓ 3.9 176 3

Parallel Seq Scan on beyond_channel_listings (cost=0.00..63,407.52 rows=45 width=4) (actual time=1.309..134.180 rows=176 loops=3)

  • Filter: (cluster_auto_id = 1039)
  • Rows Removed by Filter: 105901
9. 1,040.160 1,040.160 ↑ 14.0 2 528

Index Scan using beyond_channel_listing_dates_listing_id on beyond_channel_listing_dates dates (cost=0.57..28,585.77 rows=28 width=9) (actual time=1.398..1.970 rows=2 loops=528)

  • Index Cond: (listing_id = beyond_channel_listings.id)
  • Filter: ((date >= '2019-03-01'::date) AND (date <= '2019-03-06'::date) AND (availability = 'available'::availability_type))
  • Rows Removed by Filter: 1058
10. 0.094 491.628 ↑ 2.2 138 1

Nested Loop (cost=0.42..2,525.22 rows=307 width=40) (actual time=488.960..491.628 rows=138 loops=1)

11. 489.326 489.326 ↑ 2.2 138 1

CTE Scan on dates_agg (cost=0.00..6.14 rows=307 width=36) (actual time=488.896..489.326 rows=138 loops=1)

12. 2.208 2.208 ↑ 1.0 1 138

Index Scan using beyond_listing_pkey on beyond_channel_listings channel_listings (cost=0.42..8.21 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=138)

  • Index Cond: (id = dates_agg.channel_listing_id)
13. 1.932 1.932 ↑ 1.0 1 138

Index Scan using beyond_listings_pkey on beyond_listings listings (cost=0.42..1.08 rows=1 width=989) (actual time=0.014..0.014 rows=1 loops=138)

  • Index Cond: (id = channel_listings.master_listing_id)