explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BVWF

Settings
# exclusive inclusive rows x rows loops node
1. 798.778 2,258.060 ↑ 1.6 7,794 1

Nested Loop Left Join (cost=32,754.72..82,119.83 rows=12,298 width=11) (actual time=1,111.015..2,258.060 rows=7,794 loops=1)

  • Join Filter: ((hashtag.hashtag_key_word)::text ~~ (('%'::text || black.hashtag_key_word) || '%'::text))
  • Rows Removed by Join Filter: 1,698,598
2. 3.673 1,116.856 ↑ 1.4 5,523 1

Unique (cost=32,754.72..32,834.58 rows=7,986 width=33) (actual time=1,110.525..1,116.856 rows=5,523 loops=1)

3. 8.752 1,113.183 ↑ 1.3 6,374 1

Sort (cost=32,754.72..32,774.68 rows=7,986 width=33) (actual time=1,110.524..1,113.183 rows=6,374 loops=1)

  • Sort Key: hashtag.id_hashtag, white.ss_category_name, white.hashtag_filter_group_name
  • Sort Method: quicksort Memory: 854kB
4. 772.800 1,104.431 ↑ 1.3 6,374 1

Nested Loop (cost=0.00..32,237.10 rows=7,986 width=33) (actual time=0.592..1,104.431 rows=6,374 loops=1)

  • Join Filter: ((hashtag.hashtag_key_word)::text ~~ (('%'::text || white.hashtag_key_word) || '%'::text))
  • Rows Removed by Join Filter: 1,591,229
5. 4.172 4.172 ↓ 1.0 9,923 1

Seq Scan on hashtag (cost=0.00..280.21 rows=9,921 width=26) (actual time=0.022..4.172 rows=9,923 loops=1)

  • Filter: (deleted_at IS NULL)
6. 327.340 327.459 ↑ 1.0 161 9,923

Materialize (cost=0.00..11.67 rows=161 width=21) (actual time=0.000..0.033 rows=161 loops=9,923)

7. 0.119 0.119 ↑ 1.0 161 1

Seq Scan on outfit_item_hashtag_filter white (cost=0.00..10.86 rows=161 width=21) (actual time=0.024..0.119 rows=161 loops=1)

  • Filter: ((deleted_at IS NULL) AND (hashtag_filter_type = 'white'::hashtag_filter_type))
  • Rows Removed by Filter: 308
8. 342.255 342.426 ↑ 1.0 308 5,523

Materialize (cost=0.00..12.40 rows=308 width=14) (actual time=0.000..0.062 rows=308 loops=5,523)

9. 0.171 0.171 ↑ 1.0 308 1

Seq Scan on outfit_item_hashtag_filter black (cost=0.00..10.86 rows=308 width=14) (actual time=0.056..0.171 rows=308 loops=1)

  • Filter: ((deleted_at IS NULL) AND (hashtag_filter_type = 'black'::hashtag_filter_type))
  • Rows Removed by Filter: 161
Planning time : 0.745 ms
Execution time : 2,259.740 ms