explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QAe3 : Second query eager loaded

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 0.052 ↑ 7.0 3 1

Sort (cost=89.58..89.64 rows=21 width=1,297) (actual time=0.051..0.052 rows=3 loops=1)

  • Sort Key: tasks."position
  • Sort Method: quicksort Memory: 28kB
2. 0.004 0.040 ↑ 7.0 3 1

Nested Loop Left Join (cost=5.77..89.12 rows=21 width=1,297) (actual time=0.034..0.040 rows=3 loops=1)

  • Join Filter: (task_lock_pads_tasks_join.padlock_id = tasks.id)
3. 0.003 0.033 ↑ 1.0 3 1

Nested Loop Left Join (cost=1.28..20.33 rows=3 width=1,081) (actual time=0.028..0.033 rows=3 loops=1)

4. 0.003 0.027 ↑ 1.0 3 1

Nested Loop Left Join (cost=0.99..18.35 rows=3 width=869) (actual time=0.024..0.027 rows=3 loops=1)

5. 0.002 0.021 ↑ 1.0 3 1

Nested Loop Left Join (cost=0.84..17.28 rows=3 width=865) (actual time=0.019..0.021 rows=3 loops=1)

6. 0.003 0.015 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.56..16.60 rows=1 width=649) (actual time=0.014..0.015 rows=1 loops=1)

7. 0.006 0.006 ↑ 1.0 1 1

Index Scan using tasks_pkey on tasks (cost=0.28..8.30 rows=1 width=216) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id = 1)
8. 0.006 0.006 ↑ 1.0 1 1

Index Scan using content_pages_pkey on content_pages (cost=0.28..8.29 rows=1 width=433) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id = tasks.content_page_id)
9. 0.004 0.004 ↑ 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=216) (actual time=0.004..0.004 rows=3 loops=1)

  • Index Cond: (content_page_id = content_pages.id)
10. 0.003 0.003 ↓ 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.001..0.001 rows=0 loops=3)

  • Index Cond: (padlock_id = tasks_content_pages.id)
11. 0.003 0.003 ↓ 0.0 0 3

Index Scan using tasks_pkey on tasks locked_by_tasks_tasks (cost=0.28..0.66 rows=1 width=216) (actual time=0.001..0.001 rows=0 loops=3)

  • Index Cond: (id = task_locks.key_id)
12. 0.002 0.003 ↓ 0.0 0 3

Materialize (cost=4.49..68.49 rows=7 width=220) (actual time=0.001..0.001 rows=0 loops=3)

13. 0.000 0.001 ↓ 0.0 0 1

Nested Loop Left Join (cost=4.49..68.45 rows=7 width=220) (actual time=0.001..0.001 rows=0 loops=1)

14. 0.000 0.001 ↓ 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.001..0.001 rows=0 loops=1)

  • Recheck Cond: (padlock_id = 1)
15. 0.001 0.001 ↓ 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.001..0.001 rows=0 loops=1)

  • Index Cond: (padlock_id = 1)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using tasks_pkey on tasks locked_by_tasks_tasks_2 (cost=0.28..7.73 rows=1 width=216) (never executed)

  • Index Cond: (id = task_lock_pads_tasks_join.key_id)
Planning time : 0.746 ms
Execution time : 0.172 ms