explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2FcT

Settings
# exclusive inclusive rows x rows loops node
1. 105.005 1,872.921 ↑ 1.3 249,214 1

Gather (cost=450,950.49..483,955.64 rows=316,732 width=802) (actual time=1,773.465..1,872.921 rows=249,214 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
  • Functions: 217
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 51.741 ms, Inlining 0.000 ms, Optimization 23.521 ms, Emission 344.216 ms, Total 419.478 ms
2. 27.812 1,767.916 ↑ 1.5 35,602 7 / 7

Merge Left Join (cost=449,950.49..451,282.44 rows=52,789 width=802) (actual time=1,733.188..1,767.916 rows=35,602 loops=7)

  • Merge Cond: (("order".partner_id = web_view.partner_id) AND (("order".webmaster)::text = (web_view.webmaster)::text))
3. 102.916 1,717.278 ↑ 1.5 35,602 7 / 7

Sort (cost=446,697.04..446,829.02 rows=52,789 width=766) (actual time=1,712.440..1,717.278 rows=35,602 loops=7)

  • Sort Key: "order".partner_id, "order".webmaster
  • Sort Method: quicksort Memory: 43,127kB
  • Worker 0: Sort Method: quicksort Memory: 32,999kB
  • Worker 1: Sort Method: quicksort Memory: 33,008kB
  • Worker 2: Sort Method: quicksort Memory: 52,700kB
  • Worker 3: Sort Method: quicksort Memory: 32,954kB
  • Worker 4: Sort Method: quicksort Memory: 32,964kB
  • Worker 5: Sort Method: quicksort Memory: 32,700kB
4. 1,419.392 1,614.362 ↑ 1.5 35,602 7 / 7

Parallel Bitmap Heap Scan on "order" (cost=139,605.49..442,556.29 rows=52,789 width=766) (actual time=1,423.507..1,614.362 rows=35,602 loops=7)

  • Recheck Cond: ((offer_id = 122) AND (created_at >= '2020-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2020-12-31 23:59:59'::timestamp without time zone))
  • Heap Blocks: exact=22,341
5. 4.711 194.970 ↓ 0.0 0 1 / 7

BitmapAnd (cost=139,605.49..139,605.49 rows=316,732 width=0) (actual time=1,364.788..1,364.788 rows=0 loops=1)

6. 14.494 14.494 ↓ 1.0 631,192 1 / 7

Bitmap Index Scan on order_offer_id_idx (cost=0.00..7,145.10 rows=621,272 width=0) (actual time=101.459..101.459 rows=631,192 loops=1)

  • Index Cond: (offer_id = 122)
7. 175.764 175.764 ↓ 1.0 9,670,088 1 / 7

Bitmap Index Scan on order_created_at_idx (cost=0.00..132,301.77 rows=9,583,433 width=0) (actual time=1,230.350..1,230.350 rows=9,670,088 loops=1)

  • Index Cond: ((created_at >= '2020-01-01 00:00:00'::timestamp without time zone) AND (created_at <= '2020-12-31 23:59:59'::timestamp without time zone))
8. 5.896 22.826 ↓ 23.4 36,967 7 / 7

Sort (cost=3,253.44..3,257.39 rows=1,579 width=30) (actual time=20.725..22.826 rows=36,967 loops=7)

  • Sort Key: web_view.partner_id, web_view.webmaster
  • Sort Method: quicksort Memory: 185kB
  • Worker 0: Sort Method: quicksort Memory: 185kB
  • Worker 1: Sort Method: quicksort Memory: 185kB
  • Worker 2: Sort Method: quicksort Memory: 185kB
  • Worker 3: Sort Method: quicksort Memory: 185kB
  • Worker 4: Sort Method: quicksort Memory: 185kB
  • Worker 5: Sort Method: quicksort Memory: 185kB
9. 0.177 16.930 ↓ 1.1 1,757 7 / 7

Subquery Scan on web_view (cost=3,137.98..3,169.56 rows=1,579 width=30) (actual time=15.940..16.930 rows=1,757 loops=7)

10. 1.757 16.753 ↓ 1.1 1,757 7 / 7

HashAggregate (cost=3,137.98..3,153.77 rows=1,579 width=2,064) (actual time=15.939..16.753 rows=1,757 loops=7)

  • Group Key: w.id
11. 0.527 14.996 ↓ 1.5 2,437 7 / 7

Nested Loop Left Join (cost=0.71..3,134.03 rows=1,579 width=34) (actual time=0.063..14.996 rows=2,437 loops=7)

12. 3.927 3.927 ↓ 1.1 1,757 7 / 7

Index Scan using webmaster_offer_id_idx on webmaster w (cost=0.42..1,584.59 rows=1,579 width=38) (actual time=0.037..3.927 rows=1,757 loops=7)

  • Index Cond: (offer_id = 122)
13. 10.542 10.542 ↑ 1.0 1 12,299 / 7

Index Scan using webmaster_source_webmaster on webmaster_source ws (cost=0.29..0.97 rows=1 width=27) (actual time=0.005..0.006 rows=1 loops=12,299)

  • Index Cond: ((webmaster)::text = (w.webmaster)::text)
  • Filter: ((w.partner_id = partner_id) AND ((offer_ids IS NULL) OR (string_to_array((offer_ids)::text, ','::text) @> ((('{'::text || (w.offer_id)::text) || '}'::text))::text[])) AND ((exclude_offer_ids IS NULL) OR (NOT (string_to_array((exclude_offer_ids)::text, ','::text) @> ((('{'::text || (w.offer_id)::text) || '}'::text))::text[]))))
  • Rows Removed by Filter: 0
Planning time : 6.150 ms
Execution time : 1,891.043 ms