explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KbN7

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1.930 ↓ 0.0 0 1

Nested Loop Left Join (cost=160.12..176.19 rows=1 width=147) (actual time=1.930..1.930 rows=0 loops=1)

2. 0.000 1.930 ↓ 0.0 0 1

Nested Loop Left Join (cost=159.97..168.01 rows=1 width=143) (actual time=1.930..1.930 rows=0 loops=1)

3. 0.001 1.930 ↓ 0.0 0 1

Limit (cost=159.81..159.82 rows=1 width=139) (actual time=1.930..1.930 rows=0 loops=1)

4. 0.011 1.929 ↓ 0.0 0 1

Sort (cost=159.81..159.82 rows=1 width=139) (actual time=1.929..1.929 rows=0 loops=1)

  • Sort Key: outfit.outfit_post_datetime DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.000 1.918 ↓ 0.0 0 1

GroupAggregate (cost=72.88..159.80 rows=1 width=139) (actual time=1.918..1.918 rows=0 loops=1)

  • Group Key: outfit.id_outfit
6. 0.000 1.918 ↓ 0.0 0 1

Nested Loop (cost=72.88..159.79 rows=1 width=135) (actual time=1.918..1.918 rows=0 loops=1)

7. 0.000 1.918 ↓ 0.0 0 1

Nested Loop (cost=72.46..152.28 rows=1 width=139) (actual time=1.918..1.918 rows=0 loops=1)

8. 0.083 0.836 ↓ 10.3 278 1

Merge Join (cost=72.17..142.04 rows=27 width=143) (actual time=0.413..0.836 rows=278 loops=1)

  • Merge Cond: (rel_outfit_hashtag.id_outfit = detection_item.id_outfit)
9. 0.178 0.626 ↑ 209.2 478 1

Merge Join (cost=2.43..24,067.34 rows=100,000 width=139) (actual time=0.018..0.626 rows=478 loops=1)

  • Merge Cond: (rel_outfit_hashtag.id_outfit = outfit.id_outfit)
10. 0.327 0.327 ↑ 209.2 478 1

Index Only Scan using outfit_hashtag_idx on rel_outfit_hashtag (cost=0.29..5,872.22 rows=100,000 width=8) (actual time=0.011..0.327 rows=478 loops=1)

  • Heap Fetches: 478
11. 0.121 0.121 ↑ 1,530.3 672 1

Index Scan using outfit_pkey on outfit (cost=0.42..167,617.47 rows=1,028,357 width=131) (actual time=0.004..0.121 rows=672 loops=1)

  • Filter: (deleted_at IS NULL)
12. 0.086 0.127 ↓ 1.4 376 1

Sort (cost=17.95..18.64 rows=276 width=8) (actual time=0.091..0.127 rows=376 loops=1)

  • Sort Key: detection_item.id_outfit
  • Sort Method: quicksort Memory: 37kB
13. 0.041 0.041 ↑ 1.0 276 1

Seq Scan on detection_item (cost=0.00..6.76 rows=276 width=8) (actual time=0.008..0.041 rows=276 loops=1)

14. 1.112 1.112 ↓ 0.0 0 278

Index Scan using hashtag_pkey on hashtag (cost=0.29..0.37 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=278)

  • Index Cond: (id_hashtag = rel_outfit_hashtag.id_hashtag)
  • Filter: (lower((hashtag_key_word)::text) = 'hello'::text)
  • Rows Removed by Filter: 1
15. 0.000 0.000 ↓ 0.0 0

Index Scan using item_pkey on item (cost=0.42..7.50 rows=1 width=4) (never executed)

  • Index Cond: (id_item = detection_item.id_item)
  • Filter: ((im_name)::text ~~ '%%-53'::text)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using outfit_comment_count_id_outfit_key on outfit_comment_count (cost=0.15..8.17 rows=1 width=8) (never executed)

  • Index Cond: (id_outfit = outfit.id_outfit)
  • Filter: (deleted_at IS NULL)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_id_outfit on outfit_star_count (cost=0.15..8.17 rows=1 width=8) (never executed)

  • Index Cond: (id_outfit = outfit.id_outfit)
  • Filter: (deleted_at IS NULL)
Planning time : 1.902 ms
Execution time : 2.120 ms