explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qdW

Settings
# exclusive inclusive rows x rows loops node
1. 0.147 19,973.043 ↑ 2.6 134 1

Nested Loop (cost=1,350,829.19..1,354,031.50 rows=345 width=1,025) (actual time=19,926.720..19,973.043 rows=134 loops=1)

2.          

CTE dates_agg

3. 0.226 19,927.259 ↑ 2.6 134 1

Finalize GroupAggregate (cost=1,350,786.62..1,350,828.35 rows=345 width=36) (actual time=19,926.609..19,927.259 rows=134 loops=1)

  • Group Key: dates.listing_id
  • Filter: (count(*) = 7)
  • Rows Removed by Filter: 87
4. 0.000 19,927.033 ↑ 1.3 221 1

Gather Merge (cost=1,350,786.62..1,350,822.74 rows=288 width=44) (actual time=19,926.597..19,927.033 rows=221 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 0.408 59,611.311 ↑ 1.9 74 3

Partial GroupAggregate (cost=1,349,786.59..1,349,789.47 rows=144 width=44) (actual time=19,870.250..19,870.437 rows=74 loops=3)

  • Group Key: dates.listing_id
6. 2.064 59,610.903 ↓ 2.8 399 3

Sort (cost=1,349,786.59..1,349,786.95 rows=144 width=9) (actual time=19,870.238..19,870.301 rows=399 loops=3)

  • Sort Key: dates.listing_id
  • Sort Method: quicksort Memory: 46kB
7. 3.993 59,608.839 ↓ 2.8 399 3

Nested Loop (cost=0.57..1,349,781.43 rows=144 width=9) (actual time=228.791..19,869.613 rows=399 loops=3)

8. 462.510 462.510 ↓ 3.9 176 3

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

  • Filter: (cluster_auto_id = 1039)
  • Rows Removed by Filter: 105899
9. 59,142.336 59,142.336 ↑ 16.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=32 width=9) (actual time=78.709..112.012 rows=2 loops=528)

  • Index Cond: (listing_id = beyond_channel_listings.id)
  • Filter: ((date >= '2019-03-01'::date) AND (date <= '2019-03-07'::date) AND (availability = 'available'::availability_type))
  • Rows Removed by Filter: 1058
10. 0.126 19,955.342 ↑ 2.6 134 1

Nested Loop (cost=0.42..2,830.70 rows=345 width=40) (actual time=19,926.660..19,955.342 rows=134 loops=1)

11. 19,927.344 19,927.344 ↑ 2.6 134 1

CTE Scan on dates_agg (cost=0.00..6.90 rows=345 width=36) (actual time=19,926.614..19,927.344 rows=134 loops=1)

12. 27.872 27.872 ↑ 1.0 1 134

Index Scan using beyond_listing_pkey on beyond_channel_listings channel_listings (cost=0.42..8.18 rows=1 width=8) (actual time=0.208..0.208 rows=1 loops=134)

  • Index Cond: (id = dates_agg.channel_listing_id)
13. 17.554 17.554 ↑ 1.0 1 134

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

  • Index Cond: (id = channel_listings.master_listing_id)