explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eVnJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 16.366 ↓ 10.6 53 1

Limit (cost=7,643.03..7,773.12 rows=5 width=483) (actual time=8.282..16.366 rows=53 loops=1)

2.          

Initplan (for Limit)

3. 5.351 6.509 ↑ 440.9 58 1

Bitmap Heap Scan on document_produced document_produced_1 (cost=576.13..7,469.75 rows=25,571 width=4) (actual time=6.128..6.509 rows=58 loops=1)

  • Recheck Cond: (parent_doc_name = 'Task'::text)
  • Filter: (doc_name = 'Task'::text)
  • Rows Removed by Filter: 28519
  • Heap Blocks: exact=550
4. 1.158 1.158 ↑ 1.0 28,577 1

Bitmap Index Scan on document_produced_parent_doc_name_index (cost=0.00..569.73 rows=29,508 width=0) (actual time=1.158..1.158 rows=28,577 loops=1)

  • Index Cond: (parent_doc_name = 'Task'::text)
5. 8.244 16.359 ↓ 10.6 53 1

ProjectSet (cost=173.29..303.38 rows=5 width=483) (actual time=8.281..16.359 rows=53 loops=1)

6. 0.038 7.903 ↓ 10.6 53 1

Result (cost=173.29..173.54 rows=5 width=394) (actual time=7.856..7.903 rows=53 loops=1)

7. 0.061 7.865 ↓ 10.6 53 1

Sort (cost=173.29..173.30 rows=5 width=394) (actual time=7.854..7.865 rows=53 loops=1)

  • Sort Key: t.date DESC
  • Sort Method: quicksort Memory: 61kB
8. 0.237 7.804 ↓ 10.6 53 1

Nested Loop Left Join (cost=6.80..173.23 rows=5 width=394) (actual time=6.683..7.804 rows=53 loops=1)

9. 0.063 7.461 ↓ 10.6 53 1

Nested Loop Left Join (cost=6.52..169.18 rows=5 width=380) (actual time=6.665..7.461 rows=53 loops=1)

10. 0.040 7.345 ↓ 10.6 53 1

Nested Loop Left Join (cost=6.25..167.32 rows=5 width=333) (actual time=6.660..7.345 rows=53 loops=1)

11. 0.018 7.252 ↓ 10.6 53 1

Nested Loop Left Join (cost=5.98..149.85 rows=5 width=333) (actual time=6.656..7.252 rows=53 loops=1)

12. 0.054 7.128 ↓ 10.6 53 1

Nested Loop Left Join (cost=5.71..147.98 rows=5 width=290) (actual time=6.649..7.128 rows=53 loops=1)

13. 0.024 7.021 ↓ 10.6 53 1

Nested Loop Left Join (cost=5.43..130.52 rows=5 width=290) (actual time=6.640..7.021 rows=53 loops=1)

14. 0.039 6.891 ↓ 10.6 53 1

Hash Left Join (cost=5.14..88.98 rows=5 width=233) (actual time=6.636..6.891 rows=53 loops=1)

  • Hash Cond: (t.status_id = st.id)
15. 6.786 6.786 ↓ 10.6 53 1

Index Scan using model_task_pkey on model_task t (cost=0.42..84.25 rows=5 width=174) (actual time=6.559..6.786 rows=53 loops=1)

  • Index Cond: (id = ANY ($4))
  • Filter: (NOT COALESCE(is_deleted, false))
  • Rows Removed by Filter: 5
16. 0.031 0.066 ↑ 1.0 121 1

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

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

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

18. 0.106 0.106 ↓ 0.0 0 53

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

  • Index Cond: (id = t.person_id)
19. 0.053 0.053 ↑ 1.0 1 53

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=53)

  • Index Cond: (id = t.author_id)
  • Heap Fetches: 0
20. 0.106 0.106 ↑ 1.0 1 53

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

  • Index Cond: (user_id = a.id)
21. 0.053 0.053 ↑ 1.0 1 53

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=53)

  • Index Cond: (id = t.doer_id)
  • Heap Fetches: 0
22. 0.053 0.053 ↑ 1.0 1 53

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=53)

  • Index Cond: (user_id = d.id)
23. 0.106 0.106 ↑ 1.0 1 53

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=53)

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

SubPlan (for ProjectSet)

25. 0.212 0.212 ↓ 0.0 0 106

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=106)

  • Index Cond: (doc_guid = t.guid)
  • Heap Fetches: 20
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.000 ↓ 0.0 0 106

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

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

Initplan (for Index Scan)

29. 0.000 0.318 ↑ 1.0 1 106

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

30. 0.318 0.318 ↑ 1.0 1 106

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=106)

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