explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jv35

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 52,949.771 ↑ 1.0 100 1

Limit (cost=203,680.41..203,689.66 rows=100 width=1,333) (actual time=52,948.893..52,949.771 rows=100 loops=1)

2. 0.789 52,949.763 ↑ 140.3 100 1

Unique (cost=203,680.41..204,978.37 rows=14,032 width=1,333) (actual time=52,948.892..52,949.763 rows=100 loops=1)

3. 179.669 52,948.974 ↑ 17.0 824 1

Sort (cost=203,680.41..203,715.49 rows=14,032 width=1,333) (actual time=52,948.890..52,948.974 rows=824 loops=1)

  • Sort Key: automator_ads.id, automator_ads.ad_num, automator_ads.filename, automator_ads.status, automator_ads.location, automator_ads.num_cols, automator_ads.depth, automator_ads.comments, automator_ads.salesperson_code, automator_ads.num_tear_sheets, automator_ads.ad_type, automator_ads.other, automator_ads.sourcefile, automator_ads.pfr_errors, automator_ads.pfr_warnings, automator_ads.user_id, automator_ads.colors_used, automator_ads.doubletruck, automator_ads.bleed, automator_ads.created_at, automator_ads.start_processing, automator_ads.finish_processing, automator_ads.queue_id, automator_ads.job_process_id, automator_ads.deleted_at, automator_ads.updated_at, automator_ads.lookup_ad_size_id, automator_ads.color_intent, automator_ads.processing_category_id, automator_ads.advertiser_id, automator_ads.agency_id, automator_ads.width, automator_ads.height, automator_ads.reprocess_needed, automator_ads.reprocess, automator_ads.auto_approve
  • Sort Method: quicksort Memory: 6069kB
4. 24.741 52,769.305 ↓ 1.2 16,716 1

Hash Join (cost=200,988.72..202,713.85 rows=14,032 width=1,333) (actual time=52,739.164..52,769.305 rows=16,716 loops=1)

  • Hash Cond: ((automator_ad_rundates.ad_num)::text = (automator_ads.ad_num)::text)
5. 5.789 5.789 ↑ 1.6 25,571 1

Seq Scan on automator_ad_rundates (cost=0.00..1,426.95 rows=42,095 width=516) (actual time=0.337..5.789 rows=25,571 loops=1)

  • Filter: (id IS NOT NULL)
6. 26.400 52,738.775 ↓ 1.6 5,686 1

Hash (cost=200,944.22..200,944.22 rows=3,560 width=1,333) (actual time=52,738.775..52,738.775 rows=5,686 loops=1)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 1295kB
7. 50.442 52,712.375 ↓ 1.6 5,686 1

Seq Scan on automator_ads (cost=0.00..200,944.22 rows=3,560 width=1,333) (actual time=7.685..52,712.375 rows=5,686 loops=1)

  • Filter: ((deleted_at IS NULL) AND (created_at < '2019-06-12 12:47:36.833369'::timestamp without time zone) AND ((SubPlan 2) < '2019-06-12'::date))
  • Rows Removed by Filter: 1617
8.          

SubPlan (forSeq Scan)

9. 21.909 52,661.933 ↑ 1.0 1 7,303

Result (cost=18.76..18.77 rows=1 width=4) (actual time=7.211..7.211 rows=1 loops=7,303)

10.          

Initplan (forResult)

11. 14.606 52,640.024 ↑ 1.0 1 7,303

Limit (cost=0.29..18.76 rows=1 width=4) (actual time=7.208..7.208 rows=1 loops=7,303)

12. 52,625.418 52,625.418 ↑ 210.0 1 7,303

Index Scan Backward using automator_ad_rundate_rundate on automator_ad_rundates automator_ad_rundates_1 (cost=0.29..3,879.73 rows=210 width=4) (actual time=7.206..7.206 rows=1 loops=7,303)

  • Index Cond: (rundate IS NOT NULL)
  • Filter: ((ad_num)::text = (automator_ads.ad_num)::text)
  • Rows Removed by Filter: 12573
Planning time : 1.050 ms