explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GSyC

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 2.897 ↑ 1.0 1 1

Nested Loop (cost=0.14..535.12 rows=1 width=1,577) (actual time=1.596..2.897 rows=1 loops=1)

2. 0.003 2.870 ↑ 1.0 1 1

Nested Loop (cost=0.00..526.95 rows=1 width=1,577) (actual time=1.570..2.870 rows=1 loops=1)

  • Join Filter: (feed.id = "users->user_to_feed".feed_id)
3. 0.002 2.374 ↑ 10.0 1 1

Limit (cost=0.00..489.82 rows=10 width=1,569) (actual time=1.075..2.374 rows=1 loops=1)

4. 0.596 2.372 ↑ 50.0 1 1

Seq Scan on feed (cost=0.00..2,449.12 rows=50 width=1,569) (actual time=1.074..2.372 rows=1 loops=1)

  • Filter: ((SubPlan 1) IS NOT NULL)
  • Rows Removed by Filter: 3
5.          

SubPlan (forSeq Scan)

6. 0.004 1.776 ↓ 0.0 0 4

Limit (cost=0.14..48.77 rows=1 width=4) (actual time=0.444..0.444 rows=0 loops=4)

7. 1.272 1.772 ↓ 0.0 0 4

Nested Loop (cost=0.14..48.77 rows=1 width=4) (actual time=0.443..0.443 rows=0 loops=4)

8. 0.464 0.464 ↓ 0.0 0 4

Seq Scan on user_to_feed (cost=0.00..40.60 rows=1 width=4) (actual time=0.116..0.116 rows=0 loops=4)

  • Filter: ((user_id = 1) AND (feed.id = feed_id))
  • Rows Removed by Filter: 1
9. 0.036 0.036 ↑ 1.0 1 1

Index Scan using user_pkey on "user" (cost=0.14..8.16 rows=1 width=4) (actual time=0.036..0.036 rows=1 loops=1)

  • Index Cond: (id = 1)
  • Filter: ((deleted_at > '2019-03-09 10:13:19.438+00'::timestamp with time zone) OR (deleted_at IS NULL))
10. 0.004 0.493 ↑ 10.0 1 1

Materialize (cost=0.00..35.55 rows=10 width=8) (actual time=0.492..0.493 rows=1 loops=1)

11. 0.489 0.489 ↑ 10.0 1 1

Seq Scan on user_to_feed "users->user_to_feed" (cost=0.00..35.50 rows=10 width=8) (actual time=0.488..0.489 rows=1 loops=1)

  • Filter: (user_id = 1)
12. 0.025 0.025 ↑ 1.0 1 1

Index Scan using user_pkey on "user" users (cost=0.14..8.16 rows=1 width=4) (actual time=0.024..0.025 rows=1 loops=1)

  • Index Cond: (id = 1)
  • Filter: ((deleted_at > '2019-03-09 10:13:19.438+00'::timestamp with time zone) OR (deleted_at IS NULL))