explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zDoh

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 40.822 ↓ 20.0 100 1

Limit (cost=1,058.23..1,188.32 rows=5 width=483) (actual time=16.460..40.822 rows=100 loops=1)

2.          

Initplan (for Limit)

3. 0.298 1.189 ↓ 2.7 672 1

HashAggregate (cost=884.70..887.16 rows=246 width=4) (actual time=1.082..1.189 rows=672 loops=1)

  • Group Key: tasks_doers.task_id
4. 0.048 0.891 ↓ 2.7 673 1

Append (cost=4.34..884.09 rows=246 width=4) (actual time=0.010..0.891 rows=673 loops=1)

5. 0.004 0.011 ↑ 8.0 1 1

Bitmap Heap Scan on tasks_doers (cost=4.34..20.60 rows=8 width=4) (actual time=0.010..0.011 rows=1 loops=1)

  • Recheck Cond: (user_id = 1)
  • Heap Blocks: exact=1
6. 0.007 0.007 ↑ 8.0 1 1

Bitmap Index Scan on task_doers_user_id_idx (cost=0.00..4.34 rows=8 width=0) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (user_id = 1)
7. 0.764 0.832 ↓ 2.8 672 1

Bitmap Heap Scan on model_task (cost=6.27..861.03 rows=238 width=4) (actual time=0.131..0.832 rows=672 loops=1)

  • Recheck Cond: (doer_id = 1)
  • Heap Blocks: exact=596
8. 0.068 0.068 ↓ 2.8 672 1

Bitmap Index Scan on model_task_doer_id_idx (cost=0.00..6.21 rows=238 width=0) (actual time=0.068..0.068 rows=672 loops=1)

  • Index Cond: (doer_id = 1)
9. 23.587 40.801 ↓ 20.0 100 1

ProjectSet (cost=171.07..301.15 rows=5 width=483) (actual time=16.459..40.801 rows=100 loops=1)

10. 0.071 16.219 ↓ 20.0 100 1

Result (cost=171.07..171.32 rows=5 width=394) (actual time=16.129..16.219 rows=100 loops=1)

11. 0.502 16.148 ↓ 20.0 100 1

Sort (cost=171.07..171.08 rows=5 width=394) (actual time=16.127..16.148 rows=100 loops=1)

  • Sort Key: t.date DESC
  • Sort Method: quicksort Memory: 367kB
12. 2.215 15.646 ↓ 133.0 665 1

Nested Loop Left Join (cost=86.08..171.01 rows=5 width=394) (actual time=3.625..15.646 rows=665 loops=1)

13. 0.155 12.101 ↓ 133.0 665 1

Nested Loop Left Join (cost=85.80..166.96 rows=5 width=380) (actual time=3.586..12.101 rows=665 loops=1)

14. 0.180 10.616 ↓ 133.0 665 1

Nested Loop Left Join (cost=85.53..165.09 rows=5 width=333) (actual time=3.581..10.616 rows=665 loops=1)

15. 0.733 9.106 ↓ 133.0 665 1

Nested Loop Left Join (cost=85.26..147.63 rows=5 width=333) (actual time=3.576..9.106 rows=665 loops=1)

16. 0.467 7.708 ↓ 133.0 665 1

Nested Loop Left Join (cost=84.99..145.76 rows=5 width=290) (actual time=3.567..7.708 rows=665 loops=1)

17. 0.605 6.576 ↓ 133.0 665 1

Nested Loop Left Join (cost=84.71..128.30 rows=5 width=290) (actual time=3.557..6.576 rows=665 loops=1)

18. 0.354 3.976 ↓ 133.0 665 1

Merge Right Join (cost=84.42..86.76 rows=5 width=233) (actual time=3.543..3.976 rows=665 loops=1)

  • Merge Cond: (st.id = t.status_id)
19. 0.021 0.021 ↑ 8.6 14 1

Index Scan using model_doc_status_pkey on model_doc_status st (cost=0.14..15.04 rows=121 width=63) (actual time=0.009..0.021 rows=14 loops=1)

20. 0.347 3.601 ↓ 133.0 665 1

Sort (cost=84.28..84.29 rows=5 width=174) (actual time=3.529..3.601 rows=665 loops=1)

  • Sort Key: t.status_id
  • Sort Method: quicksort Memory: 119kB
21. 3.254 3.254 ↓ 133.0 665 1

Index Scan using model_task_pkey on model_task t (cost=0.42..84.22 rows=5 width=174) (actual time=1.371..3.254 rows=665 loops=1)

  • Index Cond: (id = ANY ($4))
  • Filter: (NOT COALESCE(is_deleted, false))
  • Rows Removed by Filter: 7
22. 1.995 1.995 ↑ 1.0 1 665

Index Scan using model_person_pkey on model_person p (cost=0.29..8.31 rows=1 width=65) (actual time=0.003..0.003 rows=1 loops=665)

  • Index Cond: (id = t.person_id)
23. 0.665 0.665 ↑ 1.0 1 665

Index Only Scan using tbl_users_pkey on tbl_users a (cost=0.27..3.49 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=665)

  • Index Cond: (id = t.author_id)
  • Heap Fetches: 6
24. 0.665 0.665 ↑ 1.0 1 665

Index Scan using tbl_profiles_user_id_idx1 on tbl_profiles ap (cost=0.27..0.37 rows=1 width=51) (actual time=0.001..0.001 rows=1 loops=665)

  • Index Cond: (user_id = a.id)
25. 1.330 1.330 ↑ 1.0 1 665

Index Only Scan using tbl_users_pkey on tbl_users d (cost=0.27..3.49 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=665)

  • Index Cond: (id = t.doer_id)
  • Heap Fetches: 665
26. 1.330 1.330 ↑ 1.0 1 665

Index Scan using tbl_profiles_user_id_idx1 on tbl_profiles dp (cost=0.27..0.37 rows=1 width=55) (actual time=0.002..0.002 rows=1 loops=665)

  • Index Cond: (user_id = d.id)
27. 1.330 1.330 ↑ 1.0 1 665

Index Scan using model_listitem_pkey on model_listitem dpp (cost=0.28..0.77 rows=1 width=51) (actual time=0.002..0.002 rows=1 loops=665)

  • Index Cond: (id = dp.doer_post)
28.          

SubPlan (for ProjectSet)

29. 0.597 0.597 ↓ 0.0 0 199

Index Only Scan using document_file_doc_guid on document_file (cost=0.42..8.44 rows=1 width=0) (actual time=0.003..0.003 rows=0 loops=199)

  • Index Cond: (doc_guid = t.guid)
  • Heap Fetches: 2
30. 0.000 0.000 ↓ 0.0 0

Seq Scan on document_file document_file_1 (cost=0.00..3,307.58 rows=124,458 width=16) (never executed)

31. 0.000 0.398 ↑ 1.0 1 199

Index Scan using typology_pkey on typology (cost=8.72..16.73 rows=1 width=67) (actual time=0.002..0.002 rows=1 loops=199)

  • Index Cond: (id = $3)
32.          

Initplan (for Index Scan)

33. 0.199 0.796 ↑ 1.0 1 199

Limit (cost=0.42..8.44 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=199)

34. 0.597 0.597 ↑ 1.0 1 199

Index Scan using document_produced_doc_id_parent_doc_name_doc_name_index on document_produced (cost=0.42..8.44 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=199)

  • Index Cond: ((doc_id = t.id) AND (doc_name = 'Task'::text))
Planning time : 3.577 ms
Execution time : 41.057 ms