explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 63zo

Settings
# exclusive inclusive rows x rows loops node
1. 6.753 187.501 ↑ 2.3 513 1

Sort (cost=143,477.39..143,480.39 rows=1,200 width=2,444) (actual time=187.379..187.501 rows=513 loops=1)

  • Sort Key: o.tag_recommend DESC NULLS LAST, o.order_order_cost DESC
  • Sort Method: quicksort Memory: 1163kB
2. 0.293 180.748 ↑ 2.3 513 1

Hash Left Join (cost=123,278.64..143,416.01 rows=1,200 width=2,444) (actual time=168.618..180.748 rows=513 loops=1)

  • Hash Cond: (o.id_lang_trans = lt.id_lang)
3. 0.390 180.416 ↑ 2.3 513 1

Hash Join (cost=123,275.62..143,408.28 rows=1,200 width=2,419) (actual time=168.569..180.416 rows=513 loops=1)

  • Hash Cond: (o.id_lang = l.id_lang)
4. 0.418 179.954 ↑ 2.3 513 1

Nested Loop (cost=123,272.59..143,388.75 rows=1,200 width=2,394) (actual time=168.485..179.954 rows=513 loops=1)

5. 0.449 175.432 ↑ 2.3 513 1

Hash Join (cost=123,272.16..133,319.75 rows=1,200 width=2,376) (actual time=168.473..175.432 rows=513 loops=1)

  • Hash Cond: (o.id_cat = c.id_cat)
6. 0.449 174.614 ↑ 2.3 513 1

Nested Loop Left Join (cost=123,082.81..133,113.90 rows=1,200 width=2,329) (actual time=168.091..174.614 rows=513 loops=1)

7. 0.732 169.035 ↑ 2.3 513 1

Merge Left Join (cost=123,082.38..123,089.90 rows=1,200 width=2,305) (actual time=168.077..169.035 rows=513 loops=1)

  • Merge Cond: (o.id_post = v.id_post)
8. 1.385 168.276 ↑ 2.3 513 1

Sort (cost=122,040.42..122,043.42 rows=1,200 width=2,296) (actual time=168.045..168.276 rows=513 loops=1)

  • Sort Key: o.id_post
  • Sort Method: quicksort Memory: 1059kB
9. 0.659 166.891 ↑ 2.3 513 1

Subquery Scan on o (cost=121,964.05..121,979.05 rows=1,200 width=2,296) (actual time=166.102..166.891 rows=513 loops=1)

10. 7.220 166.232 ↑ 2.3 513 1

Sort (cost=121,964.05..121,967.05 rows=1,200 width=2,232) (actual time=166.098..166.232 rows=513 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: 1059kB
11. 0.760 159.012 ↑ 2.3 513 1

Hash Left Join (cost=2,204.97..121,902.68 rows=1,200 width=2,232) (actual time=90.979..159.012 rows=513 loops=1)

  • Hash Cond: (o_1.id_order = tt.id_order)
12. 0.543 158.220 ↑ 1.3 513 1

Nested Loop Anti Join (cost=754.24..119,754.76 rows=667 width=2,200) (actual time=90.922..158.220 rows=513 loops=1)

13. 0.455 155.112 ↑ 1.3 513 1

Hash Anti Join (cost=753.82..117,070.38 rows=673 width=2,200) (actual time=90.909..155.112 rows=513 loops=1)

  • Hash Cond: (o_1.id_order = otb.id_order)
14. 45.249 154.645 ↑ 1.4 513 1

Index Scan using orders_active_order_tag_money_rating_idx1 on orders_active o_1 (cost=7.05..116,306.75 rows=705 width=2,200) (actual time=90.879..154.645 rows=513 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: 345
15.          

SubPlan (forIndex Scan)

16. 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
17. 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[])))
18. 0.037 0.037 ↓ 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.037..0.037 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
19. 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
20. 0.008 0.008 ↑ 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.008..0.008 rows=2 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
21. 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
22. 0.013 0.013 ↓ 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.013..0.013 rows=0 loops=1)

  • Index Cond: (id_author = 27241601)
23. 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)

24. 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
25. 0.010 0.010 ↑ 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.010..0.010 rows=2 loops=1)

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

Index Scan using idx_tender_requests_order on tender_requests r_4 (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_author = 27241601) OR (hashed SubPlan 13)))
29.          

SubPlan (forIndex Scan)

30. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
31. 36.651 45.587 ↑ 12,728.0 2 1

Bitmap Heap Scan on tender_requests r_5 (cost=1,325.17..11,485.13 rows=25,456 width=8) (actual time=26.583..45.587 rows=2 loops=1)

  • Recheck Cond: (request_state = 7)
  • Filter: ((id_author = 27241601) OR (hashed SubPlan 15))
  • Rows Removed by Filter: 50912
  • Heap Blocks: exact=8794
32. 8.923 8.923 ↓ 1.0 51,106 1

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

  • Index Cond: (request_state = 7)
33.          

SubPlan (forBitmap Heap Scan)

34. 0.013 0.013 ↑ 3.0 2 1

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

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

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

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

SubPlan (forIndex Scan)

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

38. 0.000 0.000 ↓ 0.0 0

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

  • Recheck Cond: (request_state = 7)
  • Filter: ((hashed SubPlan 19) OR (id_list = 0))
39. 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)
40.          

SubPlan (forBitmap Heap Scan)

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

42. 1.595 1.595 ↑ 4.0 1 319

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

  • Index Cond: (id_order = o_1.id_order)
  • Heap Fetches: 111
43. 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)

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

45. 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
46. 0.008 0.008 ↑ 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.008..0.008 rows=2 loops=1)

  • Index Cond: (id_author = 27241601)
  • Heap Fetches: 0
47. 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
48. 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)
49. 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 = 7) AND ((id_list = 0) OR (hashed SubPlan 28)))
50.          

SubPlan (forIndex Scan)

51. 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
52. 34.917 40.719 ↑ 2.4 11,476 1

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

  • Recheck Cond: (request_state = 7)
  • Filter: ((id_list = 0) OR (hashed SubPlan 30))
  • Rows Removed by Filter: 39438
  • Heap Blocks: exact=8794
53. 5.790 5.790 ↓ 1.0 51,106 1

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

  • Index Cond: (request_state = 7)
54.          

SubPlan (forBitmap Heap Scan)

55. 0.012 0.012 ↑ 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.012 rows=2 loops=1)

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

Index Scan using idx_tender_requests_order on tender_requests r_10 (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 32)))
57.          

SubPlan (forIndex Scan)

58. 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
59. 18.529 21.394 ↓ 1.1 13,102 1

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

  • Recheck Cond: (request_state = 3)
  • Filter: ((id_list = 0) OR (hashed SubPlan 34))
  • Rows Removed by Filter: 8936
  • Heap Blocks: exact=7381
60. 2.857 2.857 ↓ 1.0 22,152 1

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

  • Index Cond: (request_state = 3)
61.          

SubPlan (forBitmap Heap Scan)

62. 0.008 0.008 ↑ 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.008 rows=2 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
64. 0.012 0.012 ↓ 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.012..0.012 rows=0 loops=1)

  • Index Cond: (id_author = 27241601)
65. 2.565 2.565 ↓ 0.0 0 513

Index Only Scan using uq_black_list_author on black_list bl (cost=0.42..3.99 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=513)

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

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

  • Buckets: 8192 Batches: 1 Memory Usage: 64kB
67. 0.000 0.031 ↓ 0.0 0 1

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

68. 0.006 0.031 ↓ 0.0 0 1

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

  • Sort Key: (sum((t1.p_weight + t2.p_weight))) DESC
  • Sort Method: quicksort Memory: 25kB
69. 0.017 0.025 ↓ 0.0 0 1

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

  • Group Key: t2.id_order
70. 0.001 0.008 ↓ 0.0 0 1

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

71. 0.007 0.007 ↓ 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.007..0.007 rows=0 loops=1)

  • Index Cond: (id_user = 27241601)
72. 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))
73. 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))
74. 0.009 0.027 ↑ 155.0 2 1

Sort (cost=1,041.92..1,042.70 rows=310 width=9) (actual time=0.026..0.027 rows=2 loops=1)

  • Sort Key: v.id_post
  • Sort Method: quicksort Memory: 25kB
75. 0.018 0.018 ↑ 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.016..0.018 rows=2 loops=1)

  • Index Cond: (id_user = 27241601)
76. 5.130 5.130 ↑ 1.0 1 513

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

  • Index Cond: (o.id_post = id_post)
77. 0.031 0.369 ↑ 1.0 60 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
78. 0.338 0.338 ↑ 1.0 60 1

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

79. 4.104 4.104 ↑ 1.0 1 513

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=513)

  • Index Cond: (id_user = o.id_user)
80. 0.040 0.072 ↑ 1.0 90 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
81. 0.032 0.032 ↑ 1.0 90 1

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

82. 0.022 0.039 ↑ 1.0 90 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
83. 0.017 0.017 ↑ 1.0 90 1

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