explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wzWT

Settings
# exclusive inclusive rows x rows loops node
1. 3.718 5,617.798 ↑ 1.0 1,290 1

Seq Scan on model_requestcontractor t (cost=0.00..6,308,274.09 rows=1,290 width=444) (actual time=10.208..5,617.798 rows=1,290 loops=1)

  • Planning time: 1.545 ms
  • Execution time: 5618.383 ms
2.          

SubPlan (forSeq Scan)

3. 2.580 6.450 ↑ 1.0 1 1,290

Aggregate (cost=8.31..8.32 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=1,290)

4. 3.870 3.870 ↑ 1.0 1 1,290

Index Scan using document_file_doc_guid on document_file (cost=0.29..8.31 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=1,290)

  • Index Cond: (doc_guid = t.guid)
5. 1.290 5,607.630 ↑ 1.0 1 1,290

Limit (cost=4,881.75..4,881.76 rows=1 width=32) (actual time=4.346..4.347 rows=1 loops=1,290)

6. 1.290 5,606.340 ↑ 1.0 1 1,290

Subquery Scan on vc (cost=4,881.75..4,881.76 rows=1 width=32) (actual time=4.346..4.346 rows=1 loops=1,290)

7. 7.740 5,605.050 ↑ 1.0 1 1,290

Sort (cost=4,881.75..4,881.75 rows=1 width=100) (actual time=4.345..4.345 rows=1 loops=1,290)

  • Sort Key: (comments."array"[3]) DESC
  • Sort Method: quicksort Memory: 25kB
8. 3.870 5,597.310 ↓ 3.0 3 1,290

Subquery Scan on comments (cost=10.51..4,881.74 rows=1 width=100) (actual time=1.875..4.339 rows=3 loops=1,290)

  • Filter: ((comments.type)::text = 'RequestContractor'::text)
  • Rows Removed by Filter: 28
9. 7.740 5,593.440 ↓ 3.1 31 1,290

Append (cost=10.51..4,881.61 rows=10 width=68) (actual time=0.029..4.336 rows=31 loops=1,290)

10. 15.245 28.380 ↑ 1.0 2 1,290

Hash Right Join (cost=10.51..13.97 rows=2 width=43) (actual time=0.014..0.022 rows=2 loops=1,290)

  • Hash Cond: (pr.user_id = mc.author_id)
11. 6.685 6.685 ↑ 1.0 93 955

Seq Scan on tbl_profiles pr (cost=0.00..2.93 rows=93 width=53) (actual time=0.002..0.007 rows=93 loops=955)

12. 1.290 6.450 ↑ 1.0 2 1,290

Hash (cost=10.48..10.48 rows=2 width=130) (actual time=0.005..0.005 rows=2 loops=1,290)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
13. 5.160 5.160 ↑ 1.0 2 1,290

Index Scan using model_comment_commentable_id_commentable_type_idx on model_comment mc (cost=0.29..10.48 rows=2 width=130) (actual time=0.003..0.004 rows=2 loops=1,290)

  • Index Cond: (commentable_id = t.id)
14. 3.870 5,557.320 ↓ 3.5 28 1,290

Subquery Scan on *SELECT* 2 (cost=0.42..4,867.62 rows=8 width=68) (actual time=0.034..4.308 rows=28 loops=1,290)

15. 115.763 5,553.450 ↓ 3.5 28 1,290

Nested Loop Left Join (cost=0.42..4,867.54 rows=8 width=43) (actual time=0.034..4.305 rows=28 loops=1,290)

  • Join Filter: (pr_1.user_id = mc_1.user_id)
  • Rows Removed by Join Filter: 1028
16. 5,401.230 5,401.230 ↓ 3.5 28 1,290

Index Scan using model_document_status_log_model_class_model_id_idx on model_document_status_log mc_1 (cost=0.42..4,853.02 rows=8 width=89) (actual time=0.030..4.187 rows=28 loops=1,290)

  • Index Cond: (model_id = t.id)
17. 36.425 36.457 ↑ 2.5 37 36,457

Materialize (cost=0.00..3.40 rows=93 width=53) (actual time=0.000..0.001 rows=37 loops=36,457)

18. 0.032 0.032 ↑ 1.0 93 1

Seq Scan on tbl_profiles pr_1 (cost=0.00..2.93 rows=93 width=53) (actual time=0.008..0.032 rows=93 loops=1)