explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2atR : First query eager loaded

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.216 ↑ 1.0 1 1

Limit (cost=33.16..33.16 rows=1 width=8) (actual time=0.211..0.216 rows=1 loops=1)

2. 0.078 0.209 ↑ 1.0 1 1

Sort (cost=33.16..33.16 rows=1 width=8) (actual time=0.209..0.209 rows=1 loops=1)

  • Sort Key: tasks."position
  • Sort Method: quicksort Memory: 25kB
3. 0.020 0.131 ↑ 1.0 1 1

HashAggregate (cost=33.14..33.15 rows=1 width=8) (actual time=0.130..0.131 rows=1 loops=1)

  • Group Key: tasks."position", tasks.id
4. 0.017 0.111 ↑ 7.0 3 1

Nested Loop Left Join (cost=5.20..33.03 rows=21 width=8) (actual time=0.096..0.111 rows=3 loops=1)

  • Join Filter: (task_lock_pads_tasks_join.padlock_id = tasks.id)
5. 0.022 0.094 ↑ 1.0 3 1

Nested Loop Left Join (cost=0.99..18.35 rows=3 width=8) (actual time=0.081..0.094 rows=3 loops=1)

6. 0.031 0.072 ↑ 1.0 3 1

Nested Loop Left Join (cost=0.84..17.28 rows=3 width=12) (actual time=0.065..0.072 rows=3 loops=1)

7. 0.031 0.041 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.56..16.60 rows=1 width=12) (actual time=0.039..0.041 rows=1 loops=1)

  • -> Index Only Scan using content_pages_pkey on content_pages (cost=0.28..8.29
8. 0.010 0.010 ↑ 1.0 1 1

Index Scan using tasks_pkey on tasks (cost=0.28..8.30 rows=1 width=12) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (id = 1)
9. 0.000 0.023 ↓ 0.0 1 1

rows=1 width=4) (cost=0..0 rows=0 width=0) (actual time=0.023..0.023 rows=1 loops=1)

  • Index Cond: (id = tasks.content_page_id)
  • Heap Fetches: 1
10. 0.025 0.025 ↑ 1.0 3 1

Index Scan using index_tasks_on_content_page_id on tasks tasks_content_pages (cost=0.28..0.65 rows=3 width=8) (actual time=0.022..0.025 rows=3 loops=1)

  • Index Cond: (content_page_id = content_pages.id)
11. 0.015 0.015 ↓ 0.0 0 3

Index Scan using index_task_locks_on_padlock_id on task_locks (cost=0.15..0.29 rows=7 width=8) (actual time=0.005..0.005 rows=0 loops=3)

  • Index Cond: (padlock_id = tasks_content_pages.id)
12. 0.007 0.012 ↓ 0.0 0 3

Materialize (cost=4.21..14.39 rows=7 width=8) (actual time=0.004..0.004 rows=0 loops=3)

13. 0.002 0.005 ↓ 0.0 0 1

Bitmap Heap Scan on task_locks task_lock_pads_tasks_join (cost=4.21..14.35 rows=7 width=8) (actual time=0.005..0.005 rows=0 loops=1)

  • Recheck Cond: (padlock_id = 1)
14. 0.003 0.003 ↓ 0.0 0 1

Bitmap Index Scan on index_task_locks_on_padlock_id (cost=0.00..4.21 rows=7 width=0) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (padlock_id = 1)
Planning time : 3.601 ms
Execution time : 0.609 ms