explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NS3B

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 48.782 ↓ 10.0 10 1

Group (cost=1,273.66..1,273.68 rows=1 width=11) (actual time=48.776..48.782 rows=10 loops=1)

  • Group Key: hashtag.id_hashtag, white.ss_category_name, white.hashtag_filter_group_name
2. 0.043 48.776 ↓ 10.0 10 1

Sort (cost=1,273.66..1,273.67 rows=1 width=11) (actual time=48.775..48.776 rows=10 loops=1)

  • Sort Key: hashtag.id_hashtag, white.ss_category_name, white.hashtag_filter_group_name
  • Sort Method: quicksort Memory: 25kB
3. 11.853 48.733 ↓ 10.0 10 1

Nested Loop (cost=0.00..1,273.65 rows=1 width=11) (actual time=6.343..48.733 rows=10 loops=1)

  • Join Filter: ((hashtag.hashtag_key_word)::text ~~ (('%'::text || white.hashtag_key_word) || '%'::text))
  • Rows Removed by Join Filter: 31,868
4. 21.294 25.000 ↓ 198.0 198 1

Nested Loop Left Join (cost=0.00..1,259.97 rows=1 width=10) (actual time=0.287..25.000 rows=198 loops=1)

  • Join Filter: ((hashtag.hashtag_key_word)::text ~~ (('%'::text || black.hashtag_key_word) || '%'::text))
  • Rows Removed by Join Filter: 62,470
  • Filter: (black.id_outfit_item_hashtag_filter IS NULL)
  • Rows Removed by Filter: 54
5. 0.052 0.052 ↓ 1.0 203 1

Seq Scan on hashtag (cost=0.00..4.02 rows=202 width=10) (actual time=0.010..0.052 rows=203 loops=1)

  • Filter: (deleted_at IS NULL)
6. 3.557 3.654 ↑ 1.0 308 203

Materialize (cost=0.00..12.40 rows=308 width=18) (actual time=0.000..0.018 rows=308 loops=203)

7. 0.097 0.097 ↑ 1.0 308 1

Seq Scan on outfit_item_hashtag_filter black (cost=0.00..10.86 rows=308 width=18) (actual time=0.025..0.097 rows=308 loops=1)

  • Filter: ((deleted_at IS NULL) AND (hashtag_filter_type = 'black'::hashtag_filter_type))
  • Rows Removed by Filter: 161
8. 11.880 11.880 ↑ 1.0 161 198

Seq Scan on outfit_item_hashtag_filter white (cost=0.00..10.86 rows=161 width=21) (actual time=0.003..0.060 rows=161 loops=198)

  • Filter: ((deleted_at IS NULL) AND (hashtag_filter_type = 'white'::hashtag_filter_type))
  • Rows Removed by Filter: 308
Planning time : 0.185 ms
Execution time : 48.839 ms