explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C4Rm

Settings
# exclusive inclusive rows x rows loops node
1. 685.304 2,035.397 ↓ 5,308.0 5,308 1

Nested Loop Left Join (cost=93,443.62..688,086.92 rows=1 width=11) (actual time=1,001.617..2,035.397 rows=5,308 loops=1)

  • Join Filter: ("position"((hashtag.hashtag_key_word)::text, black.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 1,698,598
  • Filter: (black.id_outfit_item_hashtag_filter IS NULL)
  • Rows Removed by Filter: 2,486
2. 3.664 1,007.667 ↑ 19.8 5,523 1

Unique (cost=93,443.62..98,767.89 rows=109,131 width=33) (actual time=1,001.140..1,007.667 rows=5,523 loops=1)

3. 9.259 1,004.003 ↑ 83.5 6,374 1

Sort (cost=93,443.62..94,774.69 rows=532,427 width=33) (actual time=1,001.133..1,004.003 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. 662.876 994.744 ↑ 83.5 6,374 1

Nested Loop (cost=0.00..28,243.89 rows=532,427 width=33) (actual time=0.548..994.744 rows=6,374 loops=1)

  • Join Filter: ("position"((hashtag.hashtag_key_word)::text, white.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 1,591,229
5. 4.409 4.409 ↓ 1.0 9,923 1

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

  • Filter: (deleted_at IS NULL)
6. 327.341 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.118 0.118 ↑ 1.0 161 1

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

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

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

9. 0.156 0.156 ↑ 1.0 308 1

Seq Scan on outfit_item_hashtag_filter black (cost=0.00..10.86 rows=308 width=18) (actual time=0.038..0.156 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.734 ms
Execution time : 2,036.586 ms