explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fBGs

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 6,126.605 ↑ 1.9 53 1

Limit (cost=2.64..4,084.73 rows=100 width=489) (actual time=104.240..6,126.605 rows=53 loops=1)

2. 54.231 6,126.592 ↑ 234.0 53 1

ProjectSet (cost=2.64..506,221.55 rows=12,401 width=489) (actual time=104.238..6,126.592 rows=53 loops=1)

3. 11.549 6,058.796 ↑ 234.0 53 1

Nested Loop (cost=2.64..399,913.98 rows=12,401 width=400) (actual time=62.781..6,058.796 rows=53 loops=1)

4. 177.568 3,720.863 ↓ 2.0 290,798 1

Nested Loop Left Join (cost=2.22..325,875.25 rows=145,904 width=425) (actual time=0.089..3,720.863 rows=290,798 loops=1)

5. 155.406 3,252.497 ↓ 2.0 290,798 1

Nested Loop Left Join (cost=1.94..266,726.82 rows=145,904 width=381) (actual time=0.081..3,252.497 rows=290,798 loops=1)

6. 151.979 2,806.293 ↓ 2.0 290,798 1

Nested Loop Left Join (cost=1.67..221,076.33 rows=145,904 width=334) (actual time=0.077..2,806.293 rows=290,798 loops=1)

7. 170.048 2,363.516 ↓ 2.0 290,798 1

Nested Loop Left Join (cost=1.40..178,750.53 rows=145,904 width=334) (actual time=0.072..2,363.516 rows=290,798 loops=1)

8. 179.106 1,902.670 ↓ 2.0 290,798 1

Nested Loop Left Join (cost=1.13..133,100.03 rows=145,904 width=291) (actual time=0.066..1,902.670 rows=290,798 loops=1)

9. 112.825 1,432.766 ↓ 2.0 290,798 1

Nested Loop Left Join (cost=0.85..90,774.51 rows=145,904 width=291) (actual time=0.037..1,432.766 rows=290,798 loops=1)

10. 110.432 738.345 ↓ 2.0 290,798 1

Nested Loop Left Join (cost=0.56..43,922.50 rows=145,904 width=234) (actual time=0.028..738.345 rows=290,798 loops=1)

11. 337.115 337.115 ↓ 2.0 290,798 1

Index Scan Backward using model_task_date_idx on model_task t (cost=0.42..20,594.73 rows=145,904 width=175) (actual time=0.018..337.115 rows=290,798 loops=1)

  • Filter: (NOT COALESCE(is_deleted, false))
  • Rows Removed by Filter: 1010
12. 290.798 290.798 ↑ 1.0 1 290,798

Index Scan using model_doc_status_pkey on model_doc_status st (cost=0.14..0.16 rows=1 width=63) (actual time=0.001..0.001 rows=1 loops=290,798)

  • Index Cond: (id = t.status_id)
13. 581.596 581.596 ↑ 1.0 1 290,798

Index Scan using model_person_pkey on model_person p (cost=0.29..0.32 rows=1 width=65) (actual time=0.002..0.002 rows=1 loops=290,798)

  • Index Cond: (id = t.person_id)
14. 290.798 290.798 ↑ 1.0 1 290,798

Index Only Scan using tbl_users_pkey on tbl_users a (cost=0.27..0.29 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=290,798)

  • Index Cond: (id = t.author_id)
  • Heap Fetches: 290798
15. 290.798 290.798 ↑ 1.0 1 290,798

Index Scan using tbl_profiles_user_id_idx1 on tbl_profiles ap (cost=0.27..0.31 rows=1 width=51) (actual time=0.001..0.001 rows=1 loops=290,798)

  • Index Cond: (user_id = a.id)
16. 290.798 290.798 ↑ 1.0 1 290,798

Index Only Scan using tbl_users_pkey on tbl_users d (cost=0.27..0.29 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=290,798)

  • Index Cond: (id = t.doer_id)
  • Heap Fetches: 276087
17. 290.798 290.798 ↑ 1.0 1 290,798

Index Scan using tbl_profiles_user_id_idx1 on tbl_profiles dp (cost=0.27..0.31 rows=1 width=55) (actual time=0.001..0.001 rows=1 loops=290,798)

  • Index Cond: (user_id = d.id)
18. 290.798 290.798 ↑ 1.0 1 290,798

Index Scan using model_listitem_pkey on model_listitem dpp (cost=0.28..0.41 rows=1 width=52) (actual time=0.001..0.001 rows=1 loops=290,798)

  • Index Cond: (id = dp.doer_post)
19. 2,326.384 2,326.384 ↓ 0.0 0 290,798

Index Scan using document_produced_doc_name_doc_id_key on document_produced pcdp (cost=0.42..0.50 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=290,798)

  • Index Cond: ((doc_name = 'Task'::text) AND (doc_id = t.id))
  • Filter: (parent_doc_name = 'Task'::text)
  • Rows Removed by Filter: 1
20.          

SubPlan (for ProjectSet)

21. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (doc_guid = t.guid)
  • Heap Fetches: 0
22. 13.565 13.565 ↑ 1.0 125,088 1

Seq Scan on document_file document_file_1 (cost=0.00..3,323.88 rows=125,088 width=16) (actual time=0.031..13.565 rows=125,088 loops=1)

23. 0.000 0.000 ↓ 0.0 0 106

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

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

Initplan (for Index Scan)

25. 0.106 0.530 ↑ 1.0 1 106

Limit (cost=0.42..2.64 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=106)

26. 0.424 0.424 ↑ 1.0 1 106

Index Scan using document_produced_doc_name_doc_id_key on document_produced (cost=0.42..2.64 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=106)

  • Index Cond: ((doc_name = 'Task'::text) AND (doc_id = t.id))
Planning time : 18.856 ms
Execution time : 6,126.826 ms