explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Axtq

Settings
# exclusive inclusive rows x rows loops node
1. 0.230 658.438 ↓ 939.0 939 1

Group (cost=18,797.78..18,797.80 rows=1 width=11) (actual time=658.129..658.438 rows=939 loops=1)

  • Group Key: hashtag.id_hashtag, white.ss_category_name, white.hashtag_filter_group_name
2. 1.628 658.208 ↓ 1,106.0 1,106 1

Sort (cost=18,797.78..18,797.79 rows=1 width=11) (actual time=658.127..658.208 rows=1,106 loops=1)

  • Sort Key: hashtag.id_hashtag, white.ss_category_name, white.hashtag_filter_group_name
  • Sort Method: quicksort Memory: 100kB
3. 153.219 656.580 ↓ 1,106.0 1,106 1

Nested Loop (cost=0.00..18,797.77 rows=1 width=11) (actual time=1.208..656.580 rows=1,106 loops=1)

  • Join Filter: ((hashtag.hashtag_key_word)::text ~~ (('%'::text || white.hashtag_key_word) || '%'::text))
  • Rows Removed by Join Filter: 436,331
4. 298.927 345.775 ↓ 2,717.0 2,717 1

Nested Loop Left Join (cost=0.00..18,784.09 rows=1 width=21) (actual time=0.285..345.775 rows=2,717 loops=1)

  • Join Filter: ((hashtag.hashtag_key_word)::text ~~ (('%'::text || black.hashtag_key_word) || '%'::text))
  • Rows Removed by Join Filter: 931,810
  • Filter: (black.id_outfit_item_hashtag_filter IS NULL)
  • Rows Removed by Filter: 3,894
5. 1.278 1.278 ↑ 1.0 3,038 1

Seq Scan on hashtag (cost=0.00..58.38 rows=3,038 width=21) (actual time=0.010..1.278 rows=3,038 loops=1)

  • Filter: (deleted_at IS NULL)
6. 45.474 45.570 ↑ 1.0 308 3,038

Materialize (cost=0.00..12.40 rows=308 width=18) (actual time=0.000..0.015 rows=308 loops=3,038)

7. 0.096 0.096 ↑ 1.0 308 1

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

  • Filter: ((deleted_at IS NULL) AND (hashtag_filter_type = 'black'::hashtag_filter_type))
  • Rows Removed by Filter: 161
8. 157.586 157.586 ↑ 1.0 161 2,717

Seq Scan on outfit_item_hashtag_filter white (cost=0.00..10.86 rows=161 width=21) (actual time=0.004..0.058 rows=161 loops=2,717)

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