explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UAyk

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 19.419 437.487 ↓ 314.0 44,273 1

Hash Right Join (cost=34,570.17..41,233.51 rows=141 width=7,387) (actual time=339.294..437.487 rows=44,273 loops=1)

  • Hash Cond: (models_activejob.pipeline_id = models_pipeline.pipeline_id)
2. 43.196 152.976 ↓ 98.5 32,504 1

Hash Join (cost=20,257.85..26,919.93 rows=330 width=2,089) (actual time=74.186..152.976 rows=32,504 loops=1)

  • Hash Cond: (jobs.job_id = models_activejob.active_job_id)
3. 35.851 35.851 ↓ 19.5 254,070 1

Seq Scan on jobs (cost=0.00..6,627.96 rows=12,996 width=2,076) (actual time=0.013..35.851 rows=254,070 loops=1)

4. 7.141 73.929 ↓ 1.2 39,154 1

Hash (cost=19,834.65..19,834.65 rows=33,856 width=21) (actual time=73.929..73.929 rows=39,154 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2807kB
5. 57.457 66.788 ↓ 1.2 39,154 1

Bitmap Heap Scan on models_activejob (cost=4,907.93..19,834.65 rows=33,856 width=21) (actual time=56.990..66.788 rows=39,154 loops=1)

  • Filter: (active_indicator AND (create_datetime >= '2020-02-10 03:48:08.218919+00'::timestamp with time zone))
  • Rows Removed by Filter: 225232
  • Heap Blocks: exact=11614
6. 9.331 9.331 ↑ 1.0 264,387 1

Bitmap Index Scan on active_job_indicator_dndex (cost=0.00..4,899.46 rows=264,938 width=0) (actual time=9.331..9.331 rows=264,387 loops=1)

  • Index Cond: (active_indicator = true)
7. 5.709 265.092 ↓ 102.1 13,584 1

Hash (cost=14,310.66..14,310.66 rows=133 width=5,298) (actual time=265.092..265.092 rows=13,584 loops=1)

  • Buckets: 16384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2100kB
8. 27.624 259.383 ↓ 102.1 13,584 1

Hash Right Join (cost=7,632.69..14,310.66 rows=133 width=5,298) (actual time=195.900..259.383 rows=13,584 loops=1)

  • Hash Cond: (latest_jobs.job_id = models_pipeline.latest_job_id)
9. 35.944 35.944 ↓ 19.5 254,070 1

Seq Scan on jobs latest_jobs (cost=0.00..6,627.96 rows=12,996 width=2,084) (actual time=0.012..35.944 rows=254,070 loops=1)

10. 4.918 195.815 ↓ 102.1 13,584 1

Hash (cost=7,631.03..7,631.03 rows=133 width=3,218) (actual time=195.815..195.815 rows=13,584 loops=1)

  • Buckets: 16384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1717kB
11. 3.795 190.897 ↓ 102.1 13,584 1

Nested Loop (cost=7,505.20..7,631.03 rows=133 width=3,218) (actual time=176.788..190.897 rows=13,584 loops=1)

  • Join Filter: ((datasource_by_fail_count.datasource_name)::text = (models_pipeline.datasource_id)::text)
12. 1.531 178.612 ↓ 17.0 1,698 1

Merge Join (cost=7,504.91..7,508.16 rows=100 width=3,699) (actual time=176.748..178.612 rows=1,698 loops=1)

  • Merge Cond: ((jobs_1.datasource_id)::text = (datasource_by_fail_count.datasource_name)::text)
13. 3.080 173.477 ↓ 8.5 1,698 1

Sort (cost=7,486.12..7,486.62 rows=200 width=3,183) (actual time=173.319..173.477 rows=1,698 loops=1)

  • Sort Key: models_datasource.datasource_name
  • Sort Method: quicksort Memory: 245kB
14. 0.478 170.397 ↓ 8.5 1,698 1

Hash Join (cost=7,446.71..7,478.47 rows=200 width=3,183) (actual time=169.809..170.397 rows=1,698 loops=1)

  • Hash Cond: ((models_datasource.datasource_name)::text = (jobs_1.datasource_id)::text)
15. 0.122 0.122 ↑ 1.1 1,700 1

Seq Scan on models_datasource (cost=0.00..27.02 rows=1,802 width=2,603) (actual time=0.005..0.122 rows=1,700 loops=1)

16. 0.343 169.797 ↓ 8.5 1,698 1

Hash (cost=7,444.21..7,444.21 rows=200 width=580) (actual time=169.797..169.797 rows=1,698 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 143kB
17. 132.068 169.454 ↓ 8.5 1,698 1

HashAggregate (cost=7,440.21..7,442.21 rows=200 width=580) (actual time=169.114..169.454 rows=1,698 loops=1)

  • Group Key: jobs_1.datasource_id
18. 37.386 37.386 ↓ 19.5 254,070 1

Seq Scan on jobs jobs_1 (cost=0.00..6,627.96 rows=12,996 width=1,548) (actual time=0.016..37.386 rows=254,070 loops=1)

19. 2.848 3.604 ↓ 11.3 1,700 1

Sort (cost=18.80..19.17 rows=150 width=516) (actual time=3.424..3.604 rows=1,700 loops=1)

  • Sort Key: datasource_by_fail_count.datasource_name
  • Sort Method: quicksort Memory: 128kB
20. 0.567 0.756 ↓ 11.3 1,700 1

HashAggregate (cost=11.88..13.38 rows=150 width=516) (actual time=0.600..0.756 rows=1,700 loops=1)

  • Group Key: (datasource_by_fail_count.datasource_name)::text
21. 0.189 0.189 ↓ 11.3 1,700 1

Seq Scan on datasource_by_fail_count (cost=0.00..11.50 rows=150 width=516) (actual time=0.012..0.189 rows=1,700 loops=1)

22. 8.490 8.490 ↑ 1.0 8 1,698

Index Scan using models_pipeline_datasource_id_5340e44a_like on models_pipeline (cost=0.29..1.13 rows=8 width=35) (actual time=0.003..0.005 rows=8 loops=1,698)

  • Index Cond: ((datasource_id)::text = (models_datasource.datasource_name)::text)
Planning time : 2.295 ms