explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ly5Y

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 22.343 ↑ 1.0 100 1

Limit (cost=2,060.81..4,662.56 rows=100 width=483) (actual time=5.948..22.343 rows=100 loops=1)

2.          

Initplan (for Limit)

3. 0.005 0.008 ↑ 8.0 1 1

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

  • Recheck Cond: (user_id = 1)
  • Heap Blocks: exact=1
4. 0.003 0.003 ↑ 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.003..0.003 rows=1 loops=1)

  • Index Cond: (user_id = 1)
5. 15.977 22.323 ↑ 1.2 100 1

ProjectSet (cost=2,040.21..5,266.38 rows=124 width=483) (actual time=5.947..22.323 rows=100 loops=1)

6. 0.063 5.749 ↑ 1.2 100 1

Result (cost=2,040.21..2,046.41 rows=124 width=394) (actual time=5.666..5.749 rows=100 loops=1)

7. 0.294 5.686 ↑ 1.2 100 1

Sort (cost=2,040.21..2,040.52 rows=124 width=394) (actual time=5.664..5.686 rows=100 loops=1)

  • Sort Key: t.date DESC
  • Sort Method: quicksort Memory: 367kB
8. 1.222 5.392 ↓ 5.4 665 1

Nested Loop Left Join (cost=156.26..2,035.90 rows=124 width=394) (actual time=0.636..5.392 rows=665 loops=1)

9. 0.190 3.505 ↓ 5.4 665 1

Hash Left Join (cost=155.98..1,935.52 rows=124 width=380) (actual time=0.624..3.505 rows=665 loops=1)

  • Hash Cond: (d.id = dp.user_id)
10. 0.167 3.189 ↓ 5.4 665 1

Hash Left Join (cost=139.23..1,918.44 rows=124 width=333) (actual time=0.495..3.189 rows=665 loops=1)

  • Hash Cond: (t.doer_id = d.id)
11. 0.191 2.933 ↓ 5.4 665 1

Hash Left Join (cost=105.78..1,884.67 rows=124 width=333) (actual time=0.404..2.933 rows=665 loops=1)

  • Hash Cond: (a.id = ap.user_id)
12. 0.169 2.619 ↓ 5.4 665 1

Hash Left Join (cost=89.03..1,867.59 rows=124 width=290) (actual time=0.278..2.619 rows=665 loops=1)

  • Hash Cond: (t.author_id = a.id)
13. 0.000 2.351 ↓ 5.4 665 1

Nested Loop Left Join (cost=55.58..1,833.82 rows=124 width=290) (actual time=0.177..2.351 rows=665 loops=1)

14. 0.175 1.054 ↓ 5.4 665 1

Hash Left Join (cost=55.29..947.69 rows=124 width=233) (actual time=0.169..1.054 rows=665 loops=1)

  • Hash Cond: (t.status_id = st.id)
15. 0.766 0.840 ↓ 5.4 665 1

Bitmap Heap Scan on model_task t (cost=50.57..942.63 rows=124 width=174) (actual time=0.125..0.840 rows=665 loops=1)

  • Recheck Cond: ((doer_id = 1) OR (id = ANY ($4)))
  • Filter: (NOT COALESCE(is_deleted, false))
  • Rows Removed by Filter: 7
  • Heap Blocks: exact=596
16. 0.001 0.074 ↓ 0.0 0 1

BitmapOr (cost=50.57..50.57 rows=248 width=0) (actual time=0.074..0.074 rows=0 loops=1)

17. 0.056 0.056 ↓ 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.056..0.056 rows=672 loops=1)

  • Index Cond: (doer_id = 1)
18. 0.017 0.017 ↑ 10.0 1 1

Bitmap Index Scan on model_task_pkey (cost=0.00..44.30 rows=10 width=0) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: (id = ANY ($4))
19. 0.018 0.039 ↑ 1.0 121 1

Hash (cost=3.21..3.21 rows=121 width=63) (actual time=0.039..0.039 rows=121 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
20. 0.021 0.021 ↑ 1.0 121 1

Seq Scan on model_doc_status st (cost=0.00..3.21 rows=121 width=63) (actual time=0.005..0.021 rows=121 loops=1)

21. 1.330 1.330 ↑ 1.0 1 665

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

  • Index Cond: (id = t.person_id)
22. 0.043 0.099 ↑ 1.0 479 1

Hash (cost=27.46..27.46 rows=479 width=4) (actual time=0.099..0.099 rows=479 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
23. 0.056 0.056 ↑ 1.0 479 1

Index Only Scan using tbl_users_pkey on tbl_users a (cost=0.27..27.46 rows=479 width=4) (actual time=0.009..0.056 rows=479 loops=1)

  • Heap Fetches: 7
24. 0.067 0.123 ↑ 1.0 478 1

Hash (cost=10.78..10.78 rows=478 width=51) (actual time=0.123..0.123 rows=478 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
25. 0.056 0.056 ↑ 1.0 478 1

Seq Scan on tbl_profiles ap (cost=0.00..10.78 rows=478 width=51) (actual time=0.005..0.056 rows=478 loops=1)

26. 0.041 0.089 ↑ 1.0 479 1

Hash (cost=27.46..27.46 rows=479 width=4) (actual time=0.089..0.089 rows=479 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
27. 0.048 0.048 ↑ 1.0 479 1

Index Only Scan using tbl_users_pkey on tbl_users d (cost=0.27..27.46 rows=479 width=4) (actual time=0.007..0.048 rows=479 loops=1)

  • Heap Fetches: 7
28. 0.071 0.126 ↑ 1.0 478 1

Hash (cost=10.78..10.78 rows=478 width=55) (actual time=0.126..0.126 rows=478 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 50kB
29. 0.055 0.055 ↑ 1.0 478 1

Seq Scan on tbl_profiles dp (cost=0.00..10.78 rows=478 width=55) (actual time=0.004..0.055 rows=478 loops=1)

30. 0.665 0.665 ↑ 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.001..0.001 rows=1 loops=665)

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

SubPlan (for ProjectSet)

32. 0.398 0.398 ↓ 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.002..0.002 rows=0 loops=199)

  • Index Cond: (doc_guid = t.guid)
  • Heap Fetches: 2
33. 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)

34. 0.000 0.199 ↑ 1.0 1 199

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

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

Initplan (for Index Scan)

36. 0.199 0.597 ↑ 1.0 1 199

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

37. 0.398 0.398 ↑ 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.002..0.002 rows=1 loops=199)

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