explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HETj

Settings
# exclusive inclusive rows x rows loops node
1. 193.912 1,851,198.770 ↓ 2.1 305,754 1

Sort (cost=15,015,178.88..15,015,543.64 rows=145,906 width=35) (actual time=1,851,143.460..1,851,198.770 rows=305,754 loops=1)

  • Sort Key: a.as_of_date
  • Sort Method: quicksort Memory: 37825kB
2. 5,931.262 1,851,004.858 ↓ 2.1 305,754 1

Subquery Scan on a (cost=13,981,324.54..15,002,664.02 rows=145,906 width=35) (actual time=1,815,419.306..1,851,004.858 rows=305,754 loops=1)

  • Filter: (a.row_number = 1)
  • Rows Removed by Filter: 28470420
3. 22,098.124 1,845,073.596 ↑ 1.0 28,776,174 1

WindowAgg (cost=13,981,324.54..14,637,899.92 rows=29,181,128 width=35) (actual time=1,815,419.302..1,845,073.596 rows=28,776,174 loops=1)

4. 706,875.350 1,822,975.472 ↑ 1.0 28,776,174 1

Sort (cost=13,981,324.54..14,054,277.36 rows=29,181,128 width=35) (actual time=1,815,419.282..1,822,975.472 rows=28,776,174 loops=1)

  • Sort Key: c.""#security.ticker"", b.as_of_date
  • Sort Method: external sort Disk: 1314584kB
5. 21,878.616 1,116,100.122 ↑ 1.0 28,776,174 1

GroupAggregate (cost=9,093,242.90..9,895,723.92 rows=29,181,128 width=35) (actual time=1,006,607.266..1,116,100.122 rows=28,776,174 loops=1)

  • Filter: ((sum(b.employees_on_platform) * 1::double precision) IS NOT NULL)
6. 798,734.340 1,094,221.506 ↓ 1.0 29,997,101 1

Sort (cost=9,093,242.90..9,166,195.72 rows=29,181,128 width=35) (actual time=1,006,607.238..1,094,221.506 rows=29,997,101 loops=1)

  • Sort Key: c.""#security.ticker"", b.as_of_date
  • Sort Method: external merge Disk: 1358248kB
7. 55,029.879 295,487.166 ↓ 1.0 29,997,101 1

Hash Join (cost=57,672.38..5,007,642.27 rows=29,181,128 width=35) (actual time=785.495..295,487.166 rows=29,997,101 loops=1)

  • Hash Cond: (b.dataset_id = c.id)
8. 239,673.058 239,673.058 ↓ 1.0 29,997,101 1

Seq Scan on datalab_records_linkedin_company b (cost=0.00..4,256,918.10 rows=29,181,128 width=16) (actual time=1.129..239,673.058 rows=29,997,101 loops=1)

  • Filter: ((employees_on_platform IS NOT NULL) AND (as_of_date <= '2020-05-18'::date))
9. 784.229 784.229 ↑ 1.0 1,230,639 1

Hash (cost=42,289.39..42,289.39 rows=1,230,639 width=27) (actual time=784.229..784.229 rows=1,230,639 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 72738kB
  • -> Seq Scan on ""$datalab_dataset"" c (cost=0.00..42289.39 rows=1230639 width=27) (actual time=0.006..365.630 rows=1230639 loops=1)"Total runtime: 1851665.822 ms