explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dZJn

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 65.660 ↓ 0.0 0 1

Nested Loop Left Join (cost=498.74..514.81 rows=1 width=147) (actual time=65.660..65.660 rows=0 loops=1)

2. 0.000 65.659 ↓ 0.0 0 1

Nested Loop Left Join (cost=498.58..506.63 rows=1 width=143) (actual time=65.659..65.659 rows=0 loops=1)

3. 0.001 65.659 ↓ 0.0 0 1

Limit (cost=498.43..498.44 rows=1 width=139) (actual time=65.659..65.659 rows=0 loops=1)

4. 0.013 65.658 ↓ 0.0 0 1

Sort (cost=498.43..498.44 rows=1 width=139) (actual time=65.658..65.658 rows=0 loops=1)

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

GroupAggregate (cost=498.40..498.42 rows=1 width=139) (actual time=65.645..65.645 rows=0 loops=1)

  • Group Key: outfit.id_outfit
6. 0.011 65.643 ↓ 0.0 0 1

Sort (cost=498.40..498.41 rows=1 width=131) (actual time=65.643..65.643 rows=0 loops=1)

  • Sort Key: outfit.id_outfit
  • Sort Method: quicksort Memory: 25kB
7. 0.002 65.632 ↓ 0.0 0 1

Nested Loop Semi Join (cost=489.41..498.39 rows=1 width=131) (actual time=65.632..65.632 rows=0 loops=1)

8. 0.004 65.621 ↑ 1.0 1 1

Nested Loop (cost=488.82..496.78 rows=1 width=135) (actual time=65.621..65.621 rows=1 loops=1)

9. 0.006 65.611 ↑ 1.0 1 1

HashAggregate (cost=488.40..488.41 rows=1 width=4) (actual time=65.611..65.611 rows=1 loops=1)

  • Group Key: detection_item.id_outfit
10. 0.005 65.605 ↑ 1.0 1 1

Merge Join (cost=0.57..488.39 rows=1 width=4) (actual time=0.028..65.605 rows=1 loops=1)

  • Merge Cond: (detection_item.id_item = item.id_item)
11. 0.012 0.012 ↑ 138.0 2 1

Index Scan using index_detection_item_id_item on detection_item (cost=0.15..20.07 rows=276 width=8) (actual time=0.011..0.012 rows=2 loops=1)

12. 65.588 65.588 ↑ 20.0 1 1

Index Scan using item_pkey on item (cost=0.42..9,344.42 rows=20 width=4) (actual time=0.013..65.588 rows=1 loops=1)

  • Filter: ((im_name)::text ~~ '%%-53'::text)
  • Rows Removed by Filter: 199,999
13. 0.006 0.006 ↑ 1.0 1 1

Index Scan using outfit_pkey on outfit (cost=0.42..8.37 rows=1 width=131) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id_outfit = detection_item.id_outfit)
  • Filter: (deleted_at IS NULL)
14. 0.006 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.58..1.09 rows=1 width=4) (actual time=0.009..0.009 rows=0 loops=1)

15. 0.003 0.003 ↓ 0.0 0 1

Index Only Scan using outfit_hashtag_idx on rel_outfit_hashtag (cost=0.29..0.33 rows=2 width=8) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (id_outfit = outfit.id_outfit)
  • Heap Fetches: 0
16. 0.000 0.000 ↓ 0.0 0

Index Scan using hashtag_pkey on hashtag (cost=0.29..0.37 rows=1 width=4) (never executed)

  • Index Cond: (id_hashtag = rel_outfit_hashtag.id_hashtag)
  • Filter: (lower((hashtag_key_word)::text) = 'hello'::text)
17. 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)
18. 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.876 ms
Execution time : 66.021 ms