explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cLlD

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

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

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

Sort (cost=53,730.72..53,730.72 rows=1 width=11) (actual time=3,035.062..3,036.517 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. 576.533 3,028.862 ↓ 6,146.0 6,146 1

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

  • Join Filter: ("position"((hashtag.hashtag_key_word)::text, white.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 1,384,089
4. 1,177.156 1,796.069 ↓ 8,635.0 8,635 1

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

  • Join Filter: ("position"((hashtag.hashtag_key_word)::text, black.hashtag_key_word) > 0)
  • Rows Removed by Join Filter: 3,038,475
  • Filter: (black.id_outfit_item_hashtag_filter IS NULL)
  • Rows Removed by Filter: 15,037
5. 4.245 4.245 ↓ 1.0 9,914 1

Seq Scan on hashtag (cost=0.00..280.12 rows=9,912 width=26) (actual time=0.028..4.245 rows=9,914 loops=1)

  • Filter: (deleted_at IS NULL)
6. 614.525 614.668 ↑ 1.0 308 9,914

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

7. 0.143 0.143 ↑ 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.143 rows=308 loops=1)

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

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

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