explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IDfg

Settings
# exclusive inclusive rows x rows loops node
1. 0.218 527.433 ↓ 939.0 939 1

Group (cost=16,458.12..16,458.13 rows=1 width=11) (actual time=527.141..527.433 rows=939 loops=1)

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

Sort (cost=16,458.12..16,458.12 rows=1 width=11) (actual time=527.139..527.215 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. 111.408 526.065 ↓ 1,106.0 1,106 1

Nested Loop (cost=0.00..16,458.11 rows=1 width=11) (actual time=1.526..526.065 rows=1,106 loops=1)

  • Join Filter: ("position"((hashtag.hashtag_key_word)::text, white.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 436,331
4. 204.570 254.354 ↓ 2,717.0 2,717 1

Nested Loop Left Join (cost=0.00..16,444.83 rows=1 width=21) (actual time=0.418..254.354 rows=2,717 loops=1)

  • Join Filter: ("position"((hashtag.hashtag_key_word)::text, black.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 931,810
  • Filter: (black.id_outfit_item_hashtag_filter IS NULL)
  • Rows Removed by Filter: 3,894
5. 1.176 1.176 ↑ 1.0 3,038 1

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

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

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

7. 0.188 0.188 ↑ 1.0 308 1

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

  • Filter: ((deleted_at IS NULL) AND (hashtag_filter_type = 'black'::hashtag_filter_type))
  • Rows Removed by Filter: 161
8. 160.303 160.303 ↑ 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.003..0.059 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.672 ms
Execution time : 527.578 ms