explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6ydW

Settings
# exclusive inclusive rows x rows loops node
1. 4.432 169.493 ↑ 2.5 346 1

Sort (cost=171,244.76..171,246.89 rows=854 width=2,475) (actual time=169.357..169.493 rows=346 loops=1)

  • Sort Key: o.tag_recommend DESC NULLS LAST, o.order_order_cost DESC
  • Sort Method: quicksort Memory: 800kB
2. 0.164 165.061 ↑ 2.5 346 1

Hash Left Join (cost=156,819.90..171,203.18 rows=854 width=2,475) (actual time=159.964..165.061 rows=346 loops=1)

  • Hash Cond: (o.id_lang_trans = lt.id_lang)
3. 0.270 164.859 ↑ 2.5 346 1

Hash Join (cost=156,816.87..171,196.82 rows=854 width=2,450) (actual time=159.917..164.859 rows=346 loops=1)

  • Hash Cond: (o.id_lang = l.id_lang)
4. 0.451 164.520 ↑ 2.5 346 1

Nested Loop (cost=156,813.85..171,182.05 rows=854 width=2,425) (actual time=159.836..164.520 rows=346 loops=1)

5. 0.278 162.685 ↑ 2.5 346 1

Hash Join (cost=156,813.42..163,991.35 rows=854 width=2,407) (actual time=159.824..162.685 rows=346 loops=1)

  • Hash Cond: (o.id_cat = c.id_cat)
6. 0.206 162.076 ↑ 2.5 346 1

Nested Loop Left Join (cost=156,600.07..163,766.25 rows=854 width=2,360) (actual time=159.478..162.076 rows=346 loops=1)

7. 0.521 160.140 ↑ 2.5 346 1

Merge Left Join (cost=156,599.63..156,605.41 rows=854 width=2,336) (actual time=159.462..160.140 rows=346 loops=1)

  • Merge Cond: (o.id_post = v.id_post)
8. 0.831 159.584 ↑ 2.5 346 1

Sort (cost=155,564.35..155,566.48 rows=854 width=2,327) (actual time=159.421..159.584 rows=346 loops=1)

  • Sort Key: o.id_post
  • Sort Method: quicksort Memory: 722kB
9. 0.470 158.753 ↑ 2.5 346 1

Subquery Scan on o (cost=155,512.09..155,522.77 rows=854 width=2,327) (actual time=158.163..158.753 rows=346 loops=1)

10. 4.500 158.283 ↑ 2.5 346 1

Sort (cost=155,512.09..155,514.23 rows=854 width=2,263) (actual time=158.159..158.283 rows=346 loops=1)

  • Sort Key: ((tt.sum + ((o_1.order_tag_money_rating * 5))::numeric)) DESC NULLS LAST, o_1.order_order_cost DESC
  • Sort Method: quicksort Memory: 722kB
11. 0.489 153.783 ↑ 2.5 346 1

Hash Left Join (cost=3,137.91..155,470.51 rows=854 width=2,263) (actual time=0.492..153.783 rows=346 loops=1)

  • Hash Cond: (o_1.id_order = tt.id_order)
12. 0.574 153.237 ↑ 1.7 346 1

Nested Loop Anti Join (cost=761.07..152,254.50 rows=583 width=2,231) (actual time=0.402..153.237 rows=346 loops=1)

13. 0.304 151.279 ↑ 1.7 346 1

Hash Anti Join (cost=760.65..149,569.40 rows=586 width=2,231) (actual time=0.388..151.279 rows=346 loops=1)

  • Hash Cond: (o_1.id_order = otb.id_order)
14. 38.282 150.963 ↑ 1.7 346 1

Index Scan using orders_active_order_tag_money_rating_idx on orders_active o_1 (cost=11.05..148,808.22 rows=602 width=2,231) (actual time=0.365..150.963 rows=346 loops=1)

  • Index Cond: (order_tag_money_rating > 0)
  • Filter: (is_active AND is_white AND (jobs_can_take > 0) AND ((themes_active AND (themes_jobs_can_take > 0)) OR (NOT themes_active) OR (themes_active IS NULL)) AND ((order_days (...)
  • Rows Removed by Filter: 403
15.          

SubPlan (forIndex Scan)

16. 0.014 0.014 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list (cost=0.42..8.53 rows=6 width=8) (actual time=0.014..0.014 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
17. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_tender_requests_order on tender_requests r (cost=8.97..23.65 rows=1 width=0) (never executed)

  • Index Cond: (id_order = o_1.id_order)
  • Filter: ((request_state = 3) AND ((id_list = 0) OR (id_author = 27241601) OR (hashed SubPlan 2)))
18.          

SubPlan (forIndex Scan)

19. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list white_list_1 (cost=0.42..8.53 rows=6 width=8) (never executed)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
20. 15.857 18.443 ↓ 1.1 7,629 1

Bitmap Heap Scan on tender_requests r_1 (cost=294.67..6,227.55 rows=7,012 width=8) (actual time=3.841..18.443 rows=7,629 loops=1)

  • Recheck Cond: (request_state = 3)
  • Filter: ((id_list = 0) OR (id_author = 27241601) OR (hashed SubPlan 4))
  • Rows Removed by Filter: 5204
  • Heap Blocks: exact=4244
21. 2.577 2.577 ↓ 1.0 12,833 1

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..284.38 rows=12,794 width=0) (actual time=2.577..2.577 rows=12,833 loops=1)

  • Index Cond: (request_state = 3)
22.          

SubPlan (forBitmap Heap Scan)

23. 0.009 0.009 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list white_list_2 (cost=0.42..8.53 rows=6 width=8) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
24. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_tender_requests_order on tender_requests r_2 (cost=8.97..23.64 rows=1 width=0) (never executed)

  • Index Cond: (id_order = o_1.id_order)
  • Filter: ((request_state = 7) AND ((id_list = 0) OR (hashed SubPlan 6)))
25.          

SubPlan (forIndex Scan)

26. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list white_list_3 (cost=0.42..8.53 rows=6 width=8) (never executed)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
27. 20.720 24.504 ↑ 2.5 6,807 1

Bitmap Heap Scan on tender_requests r_3 (cost=705.42..6,933.43 rows=17,256 width=8) (actual time=4.879..24.504 rows=6,807 loops=1)

  • Recheck Cond: (request_state = 7)
  • Filter: ((id_list = 0) OR (hashed SubPlan 8))
  • Rows Removed by Filter: 24650
  • Heap Blocks: exact=5384
28. 3.778 3.778 ↑ 1.0 31,457 1

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..692.56 rows=31,486 width=0) (actual time=3.778..3.778 rows=31,457 loops=1)

  • Index Cond: (request_state = 7)
29.          

SubPlan (forBitmap Heap Scan)

30. 0.006 0.006 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list white_list_4 (cost=0.42..8.53 rows=6 width=8) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
31. 0.000 0.000 ↓ 0.0 0

Index Scan using tender_requests_id_order_id_author_idx on tender_requests r_4 (cost=0.29..8.32 rows=1 width=0) (never executed)

  • Index Cond: ((id_order = o_1.id_order) AND (id_author = 27241601))
  • Filter: ((date_end > now()) AND (request_state = ANY ('{2,7,6,5,8}'::integer[])))
32. 0.041 0.041 ↓ 0.0 0 1

Index Scan using idx_tender_requests_author on tender_requests r_5 (cost=0.42..16.41 rows=1 width=8) (actual time=0.041..0.041 rows=0 loops=1)

  • Index Cond: (id_author = 27241601)
  • Filter: ((date_end > now()) AND (request_state = ANY ('{2,7,6,5,8}'::integer[])))
  • Rows Removed by Filter: 8
33. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list white_list_5 (cost=0.42..8.45 rows=1 width=0) (never executed)

  • Index Cond: ((id_author = 27241601) AND (id_list = o_1.id_list))
  • Heap Fetches: 0
34. 0.006 0.006 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list white_list_6 (cost=0.42..8.53 rows=6 width=8) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
35. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_orders_to on orders_to (cost=0.56..8.58 rows=1 width=0) (never executed)

  • Index Cond: ((id_order = o_1.id_order) AND (id_author = 27241601))
  • Heap Fetches: 0
36. 0.015 0.015 ↓ 0.0 0 1

Index Scan using idx_orders_to_author on orders_to orders_to_1 (cost=0.56..2,477.04 rows=1,045 width=8) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: (id_author = 27241601)
37. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on advego_lists (cost=0.00..1.04 rows=4 width=8) (actual time=0.004..0.006 rows=4 loops=1)

38. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list white_list_7 (cost=0.42..8.45 rows=1 width=0) (never executed)

  • Index Cond: ((id_author = 27241601) AND (id_list = o_1.id_list))
  • Heap Fetches: 0
39. 0.015 0.015 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list white_list_8 (cost=0.42..8.53 rows=6 width=8) (actual time=0.014..0.015 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
40. 0.000 0.000 ↓ 0.0 0

Index Scan using tender_requests_id_order_id_author_idx on tender_requests r_6 (cost=0.29..8.31 rows=1 width=0) (never executed)

  • Index Cond: ((id_order = o_1.id_order) AND (id_author = 27241601))
  • Filter: (request_state = 7)
41. 0.009 0.009 ↓ 0.0 0 1

Index Scan using tender_requests_id_author_request_state_idx on tender_requests r_7 (cost=0.42..8.44 rows=1 width=8) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: ((id_author = 27241601) AND (request_state = 7))
42. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_tender_requests_order on tender_requests r_8 (cost=8.97..23.64 rows=1 width=0) (never executed)

  • Index Cond: (id_order = o_1.id_order)
  • Filter: ((request_state = 7) AND ((id_author = 27241601) OR (hashed SubPlan 21)))
43.          

SubPlan (forIndex Scan)

44. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list w (cost=0.42..8.53 rows=6 width=8) (never executed)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
45. 25.025 29.862 ↑ 15,743.0 1 1

Bitmap Heap Scan on tender_requests r_9 (cost=705.05..6,933.05 rows=15,743 width=8) (actual time=21.142..29.862 rows=1 loops=1)

  • Recheck Cond: (request_state = 7)
  • Filter: ((id_author = 27241601) OR (hashed SubPlan 23))
  • Rows Removed by Filter: 31456
  • Heap Blocks: exact=5384
46. 4.826 4.826 ↑ 1.0 31,457 1

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..692.56 rows=31,486 width=0) (actual time=4.826..4.826 rows=31,457 loops=1)

  • Index Cond: (request_state = 7)
47.          

SubPlan (forBitmap Heap Scan)

48. 0.011 0.011 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list w_1 (cost=0.42..8.53 rows=6 width=8) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
49. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_tender_requests_order on tender_requests r_10 (cost=1.47..16.14 rows=1 width=0) (never executed)

  • Index Cond: (id_order = o_1.id_order)
  • Filter: ((request_state = 7) AND ((hashed SubPlan 25) OR (id_list = 0)))
50.          

SubPlan (forIndex Scan)

51. 0.000 0.000 ↓ 0.0 0

Seq Scan on advego_lists advego_lists_1 (cost=0.00..1.04 rows=4 width=8) (never executed)

52. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on tender_requests r_11 (cost=697.93..6,925.93 rows=17,256 width=8) (never executed)

  • Recheck Cond: (request_state = 7)
  • Filter: ((hashed SubPlan 27) OR (id_list = 0))
53. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..692.56 rows=31,486 width=0) (never executed)

  • Index Cond: (request_state = 7)
54.          

SubPlan (forBitmap Heap Scan)

55. 0.000 0.000 ↓ 0.0 0

Seq Scan on advego_lists advego_lists_2 (cost=0.00..1.04 rows=4 width=8) (never executed)

56. 1.260 1.260 ↑ 4.0 1 315

Index Only Scan using idx_tender_requests_order on tender_requests (cost=0.42..8.49 rows=4 width=0) (actual time=0.004..0.004 rows=1 loops=315)

  • Index Cond: (id_order = o_1.id_order)
  • Heap Fetches: 85
57. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on advego_lists advego_lists_3 (cost=0.00..1.04 rows=4 width=8) (actual time=0.004..0.006 rows=4 loops=1)

58. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list white_list_9 (cost=0.42..8.45 rows=1 width=0) (never executed)

  • Index Cond: ((id_author = 27241601) AND (id_list = o_1.id_list))
  • Heap Fetches: 0
59. 0.013 0.013 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list white_list_10 (cost=0.42..8.53 rows=6 width=8) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
60. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_orders_to on orders_to orders_to_2 (cost=0.56..8.58 rows=1 width=0) (never executed)

  • Index Cond: ((id_order = o_1.id_order) AND (id_author = 27241601))
  • Heap Fetches: 0
61. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_orders_to_author on orders_to orders_to_3 (cost=0.56..2,477.04 rows=1,045 width=8) (never executed)

  • Index Cond: (id_author = 27241601)
62. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_tender_requests_order on tender_requests r_12 (cost=8.97..23.64 rows=1 width=0) (never executed)

  • Index Cond: (id_order = o_1.id_order)
  • Filter: ((request_state = 7) AND ((id_list = 0) OR (hashed SubPlan 35)))
63.          

SubPlan (forIndex Scan)

64. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list wl (cost=0.42..8.53 rows=6 width=8) (never executed)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
65. 22.756 26.858 ↑ 2.5 6,807 1

Bitmap Heap Scan on tender_requests r_13 (cost=705.42..6,933.43 rows=17,256 width=8) (actual time=5.379..26.858 rows=6,807 loops=1)

  • Recheck Cond: (request_state = 7)
  • Filter: ((id_list = 0) OR (hashed SubPlan 37))
  • Rows Removed by Filter: 24650
  • Heap Blocks: exact=5384
66. 4.095 4.095 ↑ 1.0 31,457 1

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..692.56 rows=31,486 width=0) (actual time=4.095..4.095 rows=31,457 loops=1)

  • Index Cond: (request_state = 7)
67.          

SubPlan (forBitmap Heap Scan)

68. 0.007 0.007 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list wl_1 (cost=0.42..8.53 rows=6 width=8) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
69. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_tender_requests_order on tender_requests r_14 (cost=8.97..23.64 rows=1 width=0) (never executed)

  • Index Cond: (id_order = o_1.id_order)
  • Filter: ((request_state = 3) AND ((id_list = 0) OR (hashed SubPlan 39)))
70.          

SubPlan (forIndex Scan)

71. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_author_list on white_list wl_2 (cost=0.42..8.53 rows=6 width=8) (never executed)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
72. 10.125 11.629 ↓ 1.1 7,629 1

Bitmap Heap Scan on tender_requests r_15 (cost=294.67..6,195.57 rows=7,012 width=8) (actual time=2.265..11.629 rows=7,629 loops=1)

  • Recheck Cond: (request_state = 3)
  • Filter: ((id_list = 0) OR (hashed SubPlan 41))
  • Rows Removed by Filter: 5204
  • Heap Blocks: exact=4244
73. 1.495 1.495 ↓ 1.0 12,833 1

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..284.38 rows=12,794 width=0) (actual time=1.495..1.495 rows=12,833 loops=1)

  • Index Cond: (request_state = 3)
74.          

SubPlan (forBitmap Heap Scan)

75. 0.009 0.009 ↑ 6.0 1 1

Index Only Scan using idx_author_list on white_list wl_3 (cost=0.42..8.53 rows=6 width=8) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
76. 0.001 0.012 ↓ 0.0 0 1

Hash (cost=747.01..747.01 rows=207 width=8) (actual time=0.012..0.012 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
77. 0.011 0.011 ↓ 0.0 0 1

Index Scan using idx_orders_to_black_author on orders_to_black otb (cost=0.43..747.01 rows=207 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (id_author = 27241601)
78. 1.384 1.384 ↓ 0.0 0 346

Index Only Scan using uq_black_list_author on black_list bl (cost=0.42..4.58 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=346)

  • Index Cond: ((id_user = o_1.id_user) AND (id_author = 27241601))
  • Heap Fetches: 0
79. 0.000 0.057 ↓ 0.0 0 1

Hash (cost=2,235.68..2,235.68 rows=11,293 width=40) (actual time=0.057..0.057 rows=0 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 128kB
80. 0.001 0.057 ↓ 0.0 0 1

Subquery Scan on tt (cost=2,094.51..2,235.68 rows=11,293 width=40) (actual time=0.057..0.057 rows=0 loops=1)

81. 0.005 0.056 ↓ 0.0 0 1

Sort (cost=2,094.51..2,122.75 rows=11,293 width=24) (actual time=0.056..0.056 rows=0 loops=1)

  • Sort Key: (sum((t1.p_weight + t2.p_weight))) DESC
  • Sort Method: quicksort Memory: 25kB
82. 0.040 0.051 ↓ 0.0 0 1

HashAggregate (cost=1,193.15..1,334.32 rows=11,293 width=24) (actual time=0.051..0.051 rows=0 loops=1)

  • Group Key: t2.id_order
83. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=13.23..1,045.12 rows=19,738 width=24) (actual time=0.011..0.011 rows=0 loops=1)

84. 0.010 0.010 ↓ 0.0 0 1

Index Scan using idx_authors_tags_id_user on authors_tags t1 (cost=0.43..24.34 rows=10 width=28) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (id_user = 27241601)
85. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on orders_tags t2 (cost=12.80..101.83 rows=25 width=38) (never executed)

  • Recheck Cond: (((p_tag)::text = (t1.p_tag)::text) AND (p_val = t1.p_val))
86. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_orders_tags (cost=0.00..12.79 rows=25 width=0) (never executed)

  • Index Cond: (((p_tag)::text = (t1.p_tag)::text) AND (p_val = t1.p_val))
87. 0.012 0.035 ↑ 154.0 2 1

Sort (cost=1,035.25..1,036.02 rows=308 width=9) (actual time=0.035..0.035 rows=2 loops=1)

  • Sort Key: v.id_post
  • Sort Method: quicksort Memory: 25kB
88. 0.023 0.023 ↑ 154.0 2 1

Index Scan using pk_blog_post_votes on post_votes v (cost=0.56..1,022.52 rows=308 width=9) (actual time=0.021..0.023 rows=2 loops=1)

  • Index Cond: (id_user = 27241601)
89. 1.730 1.730 ↑ 1.0 1 346

Index Scan using pk_blog_posts on posts p (cost=0.43..8.38 rows=1 width=32) (actual time=0.004..0.005 rows=1 loops=346)

  • Index Cond: (o.id_post = id_post)
90. 0.024 0.331 ↑ 1.0 60 1

Hash (cost=212.60..212.60 rows=60 width=55) (actual time=0.331..0.331 rows=60 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
91. 0.307 0.307 ↑ 1.0 60 1

Seq Scan on categories c (cost=0.00..212.60 rows=60 width=55) (actual time=0.005..0.307 rows=60 loops=1)

92. 1.384 1.384 ↑ 1.0 1 346

Index Scan using pk_users on users u (cost=0.43..8.41 rows=1 width=26) (actual time=0.004..0.004 rows=1 loops=346)

  • Index Cond: (id_user = o.id_user)
93. 0.033 0.069 ↑ 1.0 90 1

Hash (cost=1.90..1.90 rows=90 width=33) (actual time=0.069..0.069 rows=90 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
94. 0.036 0.036 ↑ 1.0 90 1

Seq Scan on languages l (cost=0.00..1.90 rows=90 width=33) (actual time=0.010..0.036 rows=90 loops=1)

95. 0.019 0.038 ↑ 1.0 90 1

Hash (cost=1.90..1.90 rows=90 width=33) (actual time=0.038..0.038 rows=90 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
96. 0.019 0.019 ↑ 1.0 90 1

Seq Scan on languages lt (cost=0.00..1.90 rows=90 width=33) (actual time=0.005..0.019 rows=90 loops=1)