explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4hmJ

Settings
# exclusive inclusive rows x rows loops node
1. 8.947 151.631 ↑ 1.9 635 1

Sort (cost=126,469.29..126,472.33 rows=1,217 width=2,444) (actual time=151.474..151.631 rows=635 loops=1)

  • Sort Key: o.tag_recommend DESC NULLS LAST, o.order_order_cost DESC
  • Sort Method: quicksort Memory: 1436kB
2. 0.631 142.684 ↑ 1.9 635 1

Nested Loop Left Join (cost=104,967.25..126,406.93 rows=1,217 width=2,444) (actual time=128.685..142.684 rows=635 loops=1)

3. 0.354 136.338 ↑ 1.9 635 1

Hash Left Join (cost=104,966.81..116,243.11 rows=1,217 width=2,420) (actual time=128.672..136.338 rows=635 loops=1)

  • Hash Cond: (o.id_lang_trans = lt.id_lang)
4. 0.422 135.946 ↑ 1.9 635 1

Hash Join (cost=104,963.79..116,235.31 rows=1,217 width=2,395) (actual time=128.624..135.946 rows=635 loops=1)

  • Hash Cond: (o.id_lang = l.id_lang)
5. 0.514 135.459 ↑ 1.9 635 1

Hash Join (cost=104,960.76..116,215.55 rows=1,217 width=2,370) (actual time=128.549..135.459 rows=635 loops=1)

  • Hash Cond: (o.id_cat = c.id_cat)
6. 0.428 134.592 ↑ 1.9 635 1

Nested Loop (cost=104,771.41..116,009.47 rows=1,217 width=2,323) (actual time=128.182..134.592 rows=635 loops=1)

7. 0.928 129.084 ↑ 1.9 635 1

Hash Right Join (cost=104,770.98..105,800.69 rows=1,217 width=2,305) (actual time=128.169..129.084 rows=635 loops=1)

  • Hash Cond: (v.id_post = o.id_post)
8. 0.016 0.016 ↑ 155.0 2 1

Index Scan using pk_blog_post_votes on post_votes v (cost=0.56..1,029.09 rows=310 width=9) (actual time=0.015..0.016 rows=2 loops=1)

  • Index Cond: (id_user = 27241601)
9. 1.138 128.140 ↑ 1.9 635 1

Hash (cost=104,755.21..104,755.21 rows=1,217 width=2,296) (actual time=128.140..128.140 rows=635 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 1060kB
10. 0.830 127.002 ↑ 1.9 635 1

Subquery Scan on o (cost=104,740.00..104,755.21 rows=1,217 width=2,296) (actual time=125.970..127.002 rows=635 loops=1)

11. 9.695 126.172 ↑ 1.9 635 1

Sort (cost=104,740.00..104,743.04 rows=1,217 width=2,232) (actual time=125.965..126.172 rows=635 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: 1304kB
12. 0.842 116.477 ↑ 1.9 635 1

Hash Left Join (cost=2,204.97..104,677.63 rows=1,217 width=2,232) (actual time=0.298..116.477 rows=635 loops=1)

  • Hash Cond: (o_1.id_order = tt.id_order)
13. 0.948 115.606 ↑ 1.1 635 1

Nested Loop Anti Join (cost=754.24..102,520.31 rows=676 width=2,200) (actual time=0.248..115.606 rows=635 loops=1)

14. 0.535 112.118 ↑ 1.1 635 1

Hash Anti Join (cost=753.82..99,803.33 rows=682 width=2,200) (actual time=0.236..112.118 rows=635 loops=1)

  • Hash Cond: (o_1.id_order = otb.id_order)
15. 42.512 111.574 ↑ 1.1 635 1

Index Scan using orders_active_order_tag_money_rating_idx1 on orders_active o_1 (cost=7.05..99,039.33 rows=715 width=2,200) (actual time=0.217..111.574 rows=635 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: 219
16.          

SubPlan (forIndex Scan)

17. 0.007 0.007 ↑ 3.0 2 1

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

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

Index Scan using tender_requests_id_order_id_author_idx on tender_requests r (cost=0.41..8.44 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[])))
19. 0.035 0.035 ↓ 0.0 0 1

Index Scan using idx_tender_requests_author on tender_requests r_1 (cost=0.42..20.37 rows=1 width=8) (actual time=0.035..0.035 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
20. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((id_author = 27241601) AND (id_list = o_1.id_list))
  • Heap Fetches: 0
21. 0.005 0.005 ↑ 3.0 2 1

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

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
22. 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
23. 0.011 0.011 ↓ 0.0 0 1

Index Scan using idx_orders_to_author on orders_to orders_to_1 (cost=0.56..2,460.76 rows=1,041 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (id_author = 27241601)
24. 0.004 0.004 ↑ 1.0 4 1

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

25. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((id_author = 27241601) AND (id_list = o_1.id_list))
  • Heap Fetches: 0
26. 0.009 0.009 ↑ 3.0 2 1

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

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

Index Scan using tender_requests_id_order_id_author_idx on tender_requests r_2 (cost=0.41..8.43 rows=1 width=0) (never executed)

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

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

  • Index Cond: ((id_author = 27241601) AND (request_state = 7))
29. 5.487 5.490 ↓ 0.0 0 549

Index Scan using idx_tender_requests_order on tender_requests r_4 (cost=1.47..15.91 rows=1 width=0) (actual time=0.010..0.010 rows=0 loops=549)

  • Index Cond: (id_order = o_1.id_order)
  • Filter: ((request_state = 7) AND ((hashed SubPlan 13) OR (id_list = 0)))
  • Rows Removed by Filter: 5
30.          

SubPlan (forIndex Scan)

31. 0.003 0.003 ↑ 1.0 4 1

Seq Scan on advego_lists advego_lists_1 (cost=0.00..1.04 rows=4 width=8) (actual time=0.001..0.003 rows=4 loops=1)

32. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on tender_requests r_5 (cost=1,322.30..11,482.26 rows=27,959 width=8) (never executed)

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

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..1,314.26 rows=50,912 width=0) (never executed)

  • Index Cond: (request_state = 7)
34.          

SubPlan (forBitmap Heap Scan)

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

36. 0.492 0.492 ↑ 4.0 1 164

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

  • Index Cond: (id_order = o_1.id_order)
  • Heap Fetches: 50
37. 0.000 0.000 ↓ 0.0 0

Seq Scan on tender_requests tender_requests_1 (cost=0.00..11,768.02 rows=249,902 width=8) (never executed)

38. 0.004 0.004 ↑ 1.0 4 1

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

39. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((id_author = 27241601) AND (id_list = o_1.id_list))
  • Heap Fetches: 0
40. 0.004 0.004 ↑ 3.0 2 1

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

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
41. 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
42. 0.000 0.000 ↓ 0.0 0

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

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

Index Scan using idx_tender_requests_order on tender_requests r_6 (cost=4.96..19.40 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 24)))
44.          

SubPlan (forIndex Scan)

45. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
46. 33.477 41.869 ↑ 2.4 11,476 1

Bitmap Heap Scan on tender_requests r_7 (cost=1,325.79..11,485.75 rows=27,959 width=8) (actual time=10.354..41.869 rows=11,476 loops=1)

  • Recheck Cond: (request_state = 7)
  • Filter: ((id_list = 0) OR (hashed SubPlan 26))
  • Rows Removed by Filter: 39441
  • Heap Blocks: exact=8794
47. 8.381 8.381 ↓ 1.0 51,112 1

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..1,314.26 rows=50,912 width=0) (actual time=8.381..8.381 rows=51,112 loops=1)

  • Index Cond: (request_state = 7)
48.          

SubPlan (forBitmap Heap Scan)

49. 0.011 0.011 ↑ 3.0 2 1

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

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

Index Scan using idx_tender_requests_order on tender_requests r_8 (cost=4.96..19.40 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 28)))
51.          

SubPlan (forIndex Scan)

52. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
53. 18.349 21.122 ↓ 1.1 13,102 1

Bitmap Heap Scan on tender_requests r_9 (cost=577.26..10,231.89 rows=12,101 width=8) (actual time=4.142..21.122 rows=13,102 loops=1)

  • Recheck Cond: (request_state = 3)
  • Filter: ((id_list = 0) OR (hashed SubPlan 30))
  • Rows Removed by Filter: 8936
  • Heap Blocks: exact=7381
54. 2.764 2.764 ↓ 1.0 22,153 1

Bitmap Index Scan on tender_requests_request_state_idx (cost=0.00..569.69 rows=22,036 width=0) (actual time=2.764..2.764 rows=22,153 loops=1)

  • Index Cond: (request_state = 3)
55.          

SubPlan (forBitmap Heap Scan)

56. 0.009 0.009 ↑ 3.0 2 1

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

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

Hash (cost=744.18..744.18 rows=207 width=8) (actual time=0.009..0.009 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
58. 0.009 0.009 ↓ 0.0 0 1

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

  • Index Cond: (id_author = 27241601)
59. 2.540 2.540 ↓ 0.0 0 635

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

  • Index Cond: ((id_user = o_1.id_user) AND (id_author = 27241601))
  • Heap Fetches: 0
60. 0.001 0.029 ↓ 0.0 0 1

Hash (cost=1,349.58..1,349.58 rows=8,092 width=40) (actual time=0.029..0.029 rows=0 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 64kB
61. 0.000 0.028 ↓ 0.0 0 1

Subquery Scan on tt (cost=1,248.43..1,349.58 rows=8,092 width=40) (actual time=0.028..0.028 rows=0 loops=1)

62. 0.004 0.028 ↓ 0.0 0 1

Sort (cost=1,248.43..1,268.66 rows=8,092 width=24) (actual time=0.028..0.028 rows=0 loops=1)

  • Sort Key: (sum((t1.p_weight + t2.p_weight))) DESC
  • Sort Method: quicksort Memory: 25kB
63. 0.015 0.024 ↓ 0.0 0 1

HashAggregate (cost=622.02..723.17 rows=8,092 width=24) (actual time=0.024..0.024 rows=0 loops=1)

  • Group Key: t2.id_order
64. 0.000 0.009 ↓ 0.0 0 1

Nested Loop (cost=9.08..493.30 rows=17,162 width=24) (actual time=0.009..0.009 rows=0 loops=1)

65. 0.009 0.009 ↓ 0.0 0 1

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

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

Bitmap Heap Scan on orders_tags t2 (cost=8.65..46.81 rows=10 width=38) (never executed)

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

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

  • Index Cond: (((p_tag)::text = (t1.p_tag)::text) AND (p_val = t1.p_val))
68. 5.080 5.080 ↑ 1.0 1 635

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

  • Index Cond: (id_user = o.id_user)
69. 0.030 0.353 ↑ 1.0 60 1

Hash (cost=188.60..188.60 rows=60 width=55) (actual time=0.353..0.353 rows=60 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
70. 0.323 0.323 ↑ 1.0 60 1

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

71. 0.039 0.065 ↑ 1.0 90 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
72. 0.026 0.026 ↑ 1.0 90 1

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

73. 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
74. 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)

75. 5.715 5.715 ↑ 1.0 1 635

Index Scan using pk_blog_posts on posts p (cost=0.43..8.34 rows=1 width=32) (actual time=0.004..0.009 rows=1 loops=635)

  • Index Cond: (o.id_post = id_post)