explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VawR

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

Limit (cost=7,733.26..7,863.35 rows=5 width=483) (actual time=257.745..274.096 rows=100 loops=1)

2.          

Initplan (for Limit)

3. 6.320 7.562 ↑ 1.3 20,737 1

Bitmap Heap Scan on document_produced document_produced_1 (cost=585.50..7,562.20 rows=26,031 width=4) (actual time=1.319..7.562 rows=20,737 loops=1)

  • Recheck Cond: (parent_doc_name = ANY ('{RequestSupervisory,RequestContractor,RequestCommercialOffer,RequestPerson}'::text[]))
  • Filter: (doc_name = 'Task'::text)
  • Rows Removed by Filter: 9652
  • Heap Blocks: exact=869
4. 1.242 1.242 ↓ 1.0 30,389 1

Bitmap Index Scan on document_produced_parent_doc_name_index (cost=0.00..578.99 rows=30,040 width=0) (actual time=1.242..1.242 rows=30,389 loops=1)

  • Index Cond: (parent_doc_name = ANY ('{RequestSupervisory,RequestContractor,RequestCommercialOffer,RequestPerson}'::text[]))
5. 15.964 274.079 ↓ 20.0 100 1

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

6. 0.071 257.518 ↓ 20.0 100 1

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

7. 9.525 257.447 ↓ 20.0 100 1

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

  • Sort Key: t.date DESC
  • Sort Method: quicksort Memory: 12835kB
8. 41.479 247.922 ↓ 4,137.2 20,686 1

Nested Loop Left Join (cost=86.08..171.01 rows=5 width=394) (actual time=55.367..247.922 rows=20,686 loops=1)

9. 6.310 185.757 ↓ 4,137.2 20,686 1

Nested Loop Left Join (cost=85.80..166.96 rows=5 width=380) (actual time=55.352..185.757 rows=20,686 loops=1)

10. 1.311 158.761 ↓ 4,137.2 20,686 1

Nested Loop Left Join (cost=85.53..165.09 rows=5 width=333) (actual time=55.349..158.761 rows=20,686 loops=1)

11. 5.545 136.764 ↓ 4,137.2 20,686 1

Nested Loop Left Join (cost=85.26..147.63 rows=5 width=333) (actual time=55.345..136.764 rows=20,686 loops=1)

12. 1.139 110.533 ↓ 4,137.2 20,686 1

Nested Loop Left Join (cost=84.99..145.76 rows=5 width=290) (actual time=55.338..110.533 rows=20,686 loops=1)

13. 3.902 88.708 ↓ 4,137.2 20,686 1

Nested Loop Left Join (cost=84.71..128.30 rows=5 width=290) (actual time=55.330..88.708 rows=20,686 loops=1)

14. 6.845 64.120 ↓ 4,137.2 20,686 1

Merge Right Join (cost=84.42..86.76 rows=5 width=233) (actual time=55.323..64.120 rows=20,686 loops=1)

  • Merge Cond: (st.id = t.status_id)
15. 0.019 0.019 ↑ 1.5 80 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.006..0.019 rows=80 loops=1)

16. 7.575 57.256 ↓ 4,137.2 20,686 1

Sort (cost=84.28..84.29 rows=5 width=174) (actual time=55.312..57.256 rows=20,686 loops=1)

  • Sort Key: t.status_id
  • Sort Method: quicksort Memory: 6197kB
17. 49.681 49.681 ↓ 4,137.2 20,686 1

Index Scan using model_task_pkey on model_task t (cost=0.42..84.22 rows=5 width=174) (actual time=12.846..49.681 rows=20,686 loops=1)

  • Index Cond: (id = ANY ($4))
  • Filter: (NOT COALESCE(is_deleted, false))
  • Rows Removed by Filter: 51
18. 20.686 20.686 ↓ 0.0 0 20,686

Index Scan using model_person_pkey on model_person p (cost=0.29..8.31 rows=1 width=65) (actual time=0.001..0.001 rows=0 loops=20,686)

  • Index Cond: (id = t.person_id)
19. 20.686 20.686 ↑ 1.0 1 20,686

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=20,686)

  • Index Cond: (id = t.author_id)
  • Heap Fetches: 9
20. 20.686 20.686 ↑ 1.0 1 20,686

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=20,686)

  • Index Cond: (user_id = a.id)
21. 20.686 20.686 ↑ 1.0 1 20,686

Index Only Scan using tbl_users_pkey on tbl_users d (cost=0.27..3.49 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=20,686)

  • Index Cond: (id = t.doer_id)
  • Heap Fetches: 1418
22. 20.686 20.686 ↑ 1.0 1 20,686

Index Scan using tbl_profiles_user_id_idx1 on tbl_profiles dp (cost=0.27..0.37 rows=1 width=55) (actual time=0.001..0.001 rows=1 loops=20,686)

  • Index Cond: (user_id = d.id)
23. 20.686 20.686 ↑ 1.0 1 20,686

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=20,686)

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

SubPlan (for ProjectSet)

25. 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: 0
26. 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)

27. 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)
28.          

Initplan (for Index Scan)

29. 0.000 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)

30. 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 : 2.171 ms
Execution time : 274.253 ms