explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FQi7u

Settings
# exclusive inclusive rows x rows loops node
1. 2.464 103,573.675 ↑ 70.2 10 1

Sort (cost=8,354,789.13..8,354,790.88 rows=702 width=114) (actual time=103,573.672..103,573.675 rows=10 loops=1)

  • Sort Key: pps.project_id, tasks_data.priority
  • Sort Method: quicksort Memory: 1557kB
2. 8.925 103,571.211 ↑ 70.2 10 1

GroupAggregate (cost=8,354,733.12..8,354,755.94 rows=702 width=114) (actual time=103,559.811..103,571.211 rows=10 loops=1)

  • Group Key: pps.project_id, tasks_data.pool_name, tasks_data.priority
3. 20.901 103,562.286 ↓ 9.9 6,971 1

Sort (cost=8,354,733.12..8,354,734.88 rows=702 width=73) (actual time=103,559.474..103,562.286 rows=6,971 loops=1)

  • Sort Key: pps.project_id, tasks_data.pool_name, tasks_data.priority
  • Sort Method: quicksort Memory: 3787kB
4. 26.419 103,541.385 ↓ 9.9 6,971 1

Gather (cost=1,425.79..8,354,699.93 rows=702 width=73) (actual time=13,282.808..103,541.385 rows=6,971 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 1.478 103,514.966 ↓ 8.0 2,324 3 / 3

Hash Join (cost=425.79..8,353,629.73 rows=292 width=73) (actual time=13,270.400..103,514.966 rows=2,324 loops=3)

  • Hash Cond: (pps.id_run = tasks_data.id_run)
6. 103,508.633 103,508.633 ↑ 26.8 2,473 3 / 3

Parallel Seq Scan on pricemon_product_shop pps (cost=0.00..8,352,952.62 rows=66,240 width=44) (actual time=13,265.365..103,508.633 rows=2,473 loops=3)

  • Filter: ((sub_status = ANY ('{"Prepare hash to project_id","Send this brand to Toloka"}'::sub_status[])) AND (id_run = ANY ('{125785,125786,125787,125788,125786,125787,125788,125791,125792,125793,125794,125795,125796,125797,125799,125801,125802,125803,125804,125805,125806,125789,125790,125798,125800,125807,125808,125809,125810,125811,125812,125813,125814,125815,125816,125817,125818}'::integer[])))
  • Rows Removed by Filter: 48739188
7. 0.051 4.855 ↓ 1.2 33 3 / 3

Hash (cost=425.45..425.45 rows=27 width=45) (actual time=4.855..4.855 rows=33 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
8. 0.009 4.804 ↓ 1.2 33 3 / 3

Subquery Scan on tasks_data (cost=424.91..425.45 rows=27 width=45) (actual time=4.774..4.804 rows=33 loops=3)

9. 0.023 4.795 ↓ 1.2 33 3 / 3

Group (cost=424.91..425.18 rows=27 width=45) (actual time=4.772..4.795 rows=33 loops=3)

  • Group Key: prt.id_run, prt.pool_name, prt.priority
10. 0.109 4.772 ↓ 1.2 33 3 / 3

Sort (cost=424.91..424.98 rows=27 width=45) (actual time=4.768..4.772 rows=33 loops=3)

  • Sort Key: prt.id_run, prt.pool_name, prt.priority
  • Sort Method: quicksort Memory: 27kB
11. 0.068 4.663 ↓ 1.2 33 3 / 3

Nested Loop (cost=110.24..424.27 rows=27 width=45) (actual time=2.082..4.663 rows=33 loops=3)

12. 1.539 2.219 ↑ 1.2 33 3 / 3

Bitmap Heap Scan on pricemon_run_tasks prt (cost=109.96..231.25 rows=41 width=53) (actual time=0.730..2.219 rows=33 loops=3)

  • Recheck Cond: (id_run = ANY ('{125785,12576,125787,125788,125791,125792,125793,125794,125795,125796,125797,125799,125801,125802,125803,125804,125805,125806,125789,125790,125798,125800,125807,125808,125809,125810,125811,125812,125813,125814,125815,125816,125817,125818}'::integer[]))
  • Heap Blocks: exact=16
13. 0.680 0.680 ↑ 1.2 33 3 / 3

Bitmap Index Scan on pricemon_run_tasks_id_run_index (cost=0.00..109.94 rows=41 width=0) (actual time=0.679..0.680 rows=33 loops=3)

  • Index Cond: (id_run = ANY ('{125785,12576,125787,125788,125791,125792,125793,125794,125795,125796,125797,125799,125801,125802,125803,125804,125805,125806,125789,125790,125798,125800,125807,125808,125809,125810,125811,125812,125813,125814,125815,125816,125817,125818}'::integer[]))
14. 2.376 2.376 ↑ 1.0 1 99 / 3

Index Only Scan using pricemon_run_tasks_history_id_task_status_index on pricemon_run_tasks_history prth (cost=0.29..4.70 rows=1 width=8) (actual time=0.072..0.072 rows=1 loops=99)

  • Index Cond: ((id_task = prt.id) AND (status = 'done'::pricemon_run_tasks_history_status))
  • Heap Fetches: 33
Planning time : 4.889 ms
Execution time : 103,574.873 ms