explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iAgU

Settings
# exclusive inclusive rows x rows loops node
1. 3.104 3,114.681 ↓ 5,308.0 5,308 1

Group (cost=53,730.72..53,730.73 rows=1 width=11) (actual time=3,109.704..3,114.681 rows=5,308 loops=1)

  • Group Key: hashtag.id_hashtag, white.ss_category_name, white.hashtag_filter_group_name
2. 7.345 3,111.577 ↓ 6,146.0 6,146 1

Sort (cost=53,730.72..53,730.72 rows=1 width=11) (actual time=3,109.695..3,111.577 rows=6,146 loops=1)

  • Sort Key: hashtag.id_hashtag, white.ss_category_name, white.hashtag_filter_group_name
  • Sort Method: quicksort Memory: 481kB
3. 590.429 3,104.232 ↓ 6,146.0 6,146 1

Nested Loop (cost=0.00..53,730.71 rows=1 width=11) (actual time=1.494..3,104.232 rows=6,146 loops=1)

  • Join Filter: (strpos((hashtag.hashtag_key_word)::text, white.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 1,385,055
4. 1,200.663 1,839.805 ↓ 8,641.0 8,641 1

Nested Loop Left Join (cost=0.00..53,717.43 rows=1 width=26) (actual time=0.442..1,839.805 rows=8,641 loops=1)

  • Join Filter: (strpos((hashtag.hashtag_key_word)::text, black.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 3,040,323
  • Filter: (black.id_outfit_item_hashtag_filter IS NULL)
  • Rows Removed by Filter: 15,037
5. 4.262 4.262 ↓ 1.0 9,920 1

Seq Scan on hashtag (cost=0.00..280.12 rows=9,912 width=26) (actual time=0.022..4.262 rows=9,920 loops=1)

  • Filter: (deleted_at IS NULL)
6. 634.733 634.880 ↑ 1.0 308 9,920

Materialize (cost=0.00..12.40 rows=308 width=18) (actual time=0.000..0.064 rows=308 loops=9,920)

7. 0.147 0.147 ↑ 1.0 308 1

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

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

Seq Scan on outfit_item_hashtag_filter white (cost=0.00..10.86 rows=161 width=21) (actual time=0.002..0.078 rows=161 loops=8,641)

  • Filter: ((deleted_at IS NULL) AND (hashtag_filter_type = 'white'::hashtag_filter_type))
  • Rows Removed by Filter: 308
Planning time : 0.688 ms
Execution time : 3,116.401 ms