explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dHas

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 4.661 ↑ 1.0 20 1

Limit (cost=146.53..146.58 rows=20 width=48) (actual time=4.638..4.661 rows=20 loops=1)

2. 0.644 4.641 ↑ 39.8 20 1

Sort (cost=146.53..148.52 rows=795 width=48) (actual time=4.636..4.641 rows=20 loops=1)

  • Sort Key: content.post_created_at DESC
  • Sort Method: top-N heapsort Memory: 26kB
3. 0.163 3.997 ↓ 1.0 823 1

Append (cost=0.00..125.38 rows=795 width=48) (actual time=0.035..3.997 rows=823 loops=1)

4. 1.254 1.254 ↑ 1.0 754 1

Seq Scan on content (cost=0.00..99.36 rows=754 width=48) (actual time=0.034..1.254 rows=754 loops=1)

  • Filter: (post_created_at < now())
  • Rows Removed by Filter: 3
5. 0.008 0.049 ↑ 1.0 1 1

Subquery Scan on *SELECT* 2 (cost=0.00..0.39 rows=1 width=48) (actual time=0.045..0.049 rows=1 loops=1)

6. 0.000 0.041 ↑ 1.0 1 1

Limit (cost=0.00..0.38 rows=1 width=44) (actual time=0.040..0.041 rows=1 loops=1)

7. 0.041 0.041 ↑ 7.0 1 1

Seq Scan on questions (cost=0.00..2.63 rows=7 width=44) (actual time=0.039..0.041 rows=1 loops=1)

  • Filter: ((NOT answered) AND (post_created_at < now()))
  • Rows Removed by Filter: 1
8. 0.001 0.036 ↑ 1.0 1 1

Subquery Scan on *SELECT* 3 (cost=0.00..0.39 rows=1 width=48) (actual time=0.035..0.036 rows=1 loops=1)

9. 0.002 0.035 ↑ 1.0 1 1

Limit (cost=0.00..0.38 rows=1 width=44) (actual time=0.034..0.035 rows=1 loops=1)

10. 0.033 0.033 ↑ 7.0 1 1

Seq Scan on questions questions_1 (cost=0.00..2.63 rows=7 width=44) (actual time=0.032..0.033 rows=1 loops=1)

  • Filter: (answered AND (post_created_at < now()))
11. 0.017 0.017 ↓ 2.0 2 1

Seq Scan on external_content (cost=0.00..1.03 rows=1 width=48) (actual time=0.014..0.017 rows=2 loops=1)

  • Filter: (post_created_at < now())
12. 0.003 0.033 ↓ 2.0 2 1

Subquery Scan on *SELECT* 5 (cost=0.00..1.04 rows=1 width=48) (actual time=0.026..0.033 rows=2 loops=1)

13. 0.030 0.030 ↓ 2.0 2 1

Seq Scan on swaminars (cost=0.00..1.03 rows=1 width=44) (actual time=0.025..0.030 rows=2 loops=1)

  • Filter: (post_created_at < now())
14. 0.023 0.059 ↓ 3.0 21 1

Subquery Scan on *SELECT* 6 (cost=0.00..2.40 rows=7 width=48) (actual time=0.017..0.059 rows=21 loops=1)

15. 0.036 0.036 ↓ 3.0 21 1

Seq Scan on events (cost=0.00..2.31 rows=7 width=44) (actual time=0.014..0.036 rows=21 loops=1)

  • Filter: (post_created_at < now())
16. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on users_books (cost=0.00..1.01 rows=1 width=48) (actual time=0.010..0.011 rows=1 loops=1)

  • Filter: (post_created_at < now())
17. 0.065 0.065 ↓ 1.8 29 1

Seq Scan on rak_stories (cost=0.00..7.71 rows=16 width=48) (actual time=0.008..0.065 rows=29 loops=1)

  • Filter: (approved_at < now())
  • Rows Removed by Filter: 18
18. 0.032 0.032 ↓ 3.3 10 1

Seq Scan on trivia (cost=0.00..1.15 rows=3 width=48) (actual time=0.021..0.032 rows=10 loops=1)

  • Filter: (post_created_at < now())
19. 2.278 2.278 ↑ 5.0 2 1

Seq Scan on users_badges (cost=0.00..3.05 rows=10 width=48) (actual time=1.080..2.278 rows=2 loops=1)

  • Filter: ((to_timestamp((((badges_and_achievements -> 'badges'::text) -> (badges_and_achievements ->> 'currentBadgeId'::text)) ->> 'earnedAt'::text), '[YYYY,MM,DD,HH,MI,SS]'::text))::timestamp without time zone < now())