explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x3cH

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 699.693 ↑ 1.9 53 1

Limit (cost=34,107.61..36,709.36 rows=100 width=483) (actual time=692.330..699.693 rows=53 loops=1)

2. 31.757 699.686 ↑ 172.5 53 1

ProjectSet (cost=34,107.61..271,907.56 rows=9,140 width=483) (actual time=692.329..699.686 rows=53 loops=1)

3. 0.035 656.114 ↑ 172.5 53 1

Result (cost=34,107.61..34,564.61 rows=9,140 width=394) (actual time=656.072..656.114 rows=53 loops=1)

4. 0.108 656.079 ↑ 172.5 53 1

Sort (cost=34,107.61..34,130.46 rows=9,140 width=394) (actual time=656.069..656.079 rows=53 loops=1)

  • Sort Key: t.date DESC
  • Sort Method: quicksort Memory: 61kB
5. 34.064 655.971 ↑ 172.5 53 1

Hash Semi Join (cost=13,131.58..33,506.30 rows=9,140 width=394) (actual time=45.912..655.971 rows=53 loops=1)

  • Hash Cond: (t.id = document_produced.doc_id)
6. 74.744 616.668 ↓ 2.0 290,109 1

Hash Left Join (cost=3,273.05..22,798.40 rows=145,558 width=423) (actual time=28.320..616.668 rows=290,109 loops=1)

  • Hash Cond: (dp.doer_post = dpp.id)
7. 77.859 541.314 ↓ 2.0 290,109 1

Hash Left Join (cost=3,178.54..22,320.99 rows=145,558 width=380) (actual time=27.704..541.314 rows=290,109 loops=1)

  • Hash Cond: (d.id = dp.user_id)
8. 66.044 463.334 ↓ 2.0 290,109 1

Hash Left Join (cost=3,161.78..21,918.76 rows=145,558 width=333) (actual time=27.580..463.334 rows=290,109 loops=1)

  • Hash Cond: (t.doer_id = d.id)
9. 71.267 397.206 ↓ 2.0 290,109 1

Hash Left Join (cost=3,128.34..21,500.02 rows=145,558 width=333) (actual time=27.491..397.206 rows=290,109 loops=1)

  • Hash Cond: (a.id = ap.user_id)
10. 62.301 325.812 ↓ 2.0 290,109 1

Hash Left Join (cost=3,111.58..21,097.80 rows=145,558 width=290) (actual time=27.360..325.812 rows=290,109 loops=1)

  • Hash Cond: (t.author_id = a.id)
11. 79.771 263.413 ↓ 2.0 290,109 1

Hash Left Join (cost=3,078.13..20,678.88 rows=145,558 width=290) (actual time=27.251..263.413 rows=290,109 loops=1)

  • Hash Cond: (t.person_id = p.id)
12. 72.117 156.641 ↓ 2.0 290,109 1

Hash Left Join (cost=4.72..17,223.36 rows=145,558 width=233) (actual time=0.163..156.641 rows=290,109 loops=1)

  • Hash Cond: (t.status_id = st.id)
13. 84.405 84.405 ↓ 2.0 290,109 1

Seq Scan on model_task t (cost=0.00..16,823.16 rows=145,558 width=174) (actual time=0.023..84.405 rows=290,109 loops=1)

  • Filter: (NOT COALESCE(is_deleted, false))
  • Rows Removed by Filter: 1007
14. 0.053 0.119 ↑ 1.0 121 1

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

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

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

16. 15.624 27.001 ↑ 1.0 64,285 1

Hash (cost=2,269.85..2,269.85 rows=64,285 width=65) (actual time=27.001..27.001 rows=64,285 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 6627kB
17. 11.377 11.377 ↑ 1.0 64,285 1

Seq Scan on model_person p (cost=0.00..2,269.85 rows=64,285 width=65) (actual time=0.023..11.377 rows=64,285 loops=1)

18. 0.041 0.098 ↑ 1.0 479 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
19. 0.057 0.057 ↑ 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.014..0.057 rows=479 loops=1)

  • Heap Fetches: 7
20. 0.066 0.127 ↑ 1.0 478 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
21. 0.061 0.061 ↑ 1.0 478 1

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

22. 0.041 0.084 ↑ 1.0 479 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
23. 0.043 0.043 ↑ 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.005..0.043 rows=479 loops=1)

  • Heap Fetches: 7
24. 0.069 0.121 ↑ 1.0 478 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 50kB
25. 0.052 0.052 ↑ 1.0 478 1

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

26. 0.283 0.610 ↑ 1.0 2,023 1

Hash (cost=69.23..69.23 rows=2,023 width=51) (actual time=0.610..0.610 rows=2,023 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 185kB
27. 0.327 0.327 ↑ 1.0 2,023 1

Seq Scan on model_listitem dpp (cost=0.00..69.23 rows=2,023 width=51) (actual time=0.005..0.327 rows=2,023 loops=1)

28. 0.010 5.239 ↑ 426.6 58 1

Hash (cost=9,549.24..9,549.24 rows=24,743 width=4) (actual time=5.239..5.239 rows=58 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 259kB
29. 0.018 5.229 ↑ 426.6 58 1

Sort (cost=9,239.95..9,301.81 rows=24,743 width=4) (actual time=5.227..5.229 rows=58 loops=1)

  • Sort Key: document_produced.doc_id
  • Sort Method: quicksort Memory: 27kB
30. 4.102 5.211 ↑ 426.6 58 1

Bitmap Heap Scan on document_produced (cost=556.19..7,434.36 rows=24,743 width=4) (actual time=4.950..5.211 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
31. 1.109 1.109 ↓ 1.0 28,577 1

Bitmap Index Scan on document_produced_parent_doc_name_index (cost=0.00..550.01 rows=28,478 width=0) (actual time=1.109..1.109 rows=28,577 loops=1)

  • Index Cond: (parent_doc_name = 'Task'::text)
32.          

SubPlan (for ProjectSet)

33. 0.000 0.000 ↓ 0.0 0

Index Only Scan using document_file_doc_guid on document_file (cost=0.42..8.44 rows=1 width=0) (never executed)

  • Index Cond: (doc_guid = t.guid)
  • Heap Fetches: 0
34. 11.815 11.815 ↓ 1.0 124,461 1

Seq Scan on document_file document_file_1 (cost=0.00..3,307.58 rows=124,458 width=16) (actual time=0.013..11.815 rows=124,461 loops=1)

35. 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)
36.          

Initplan (for Index Scan)

37. 0.106 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)

38. 0.212 0.212 ↑ 1.0 1 106

Index Scan using document_produced_doc_id_index on document_produced document_produced_1 (cost=0.42..8.44 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=106)

  • Index Cond: (doc_id = t.id)
  • Filter: (doc_name = 'Task'::text)
Planning time : 4.480 ms
Execution time : 700.301 ms