explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hma4R

Settings
# exclusive inclusive rows x rows loops node
1. 29.363 1,398.818 ↑ 1.0 1 1

Aggregate (cost=5,736,143.06..5,736,143.07 rows=1 width=80) (actual time=1,398.817..1,398.818 rows=1 loops=1)

2. 27.178 1,369.455 ↓ 18.9 273,896 1

Nested Loop (cost=277.44..5,736,034.20 rows=14,514 width=36) (actual time=0.079..1,369.455 rows=273,896 loops=1)

3. 0.101 0.101 ↓ 2.3 328 1

Seq Scan on industrycompanies ic (cost=0.00..11.40 rows=140 width=4) (actual time=0.009..0.101 rows=328 loops=1)

4. 1,265.096 1,342.176 ↓ 8.0 835 328

Bitmap Heap Scan on instntradesummary x0 (cost=277.44..40,970.55 rows=104 width=47) (actual time=0.311..4.092 rows=835 loops=328)

  • Recheck Cond: ((keyinstn = ic.keyinstn) AND (updoperation < 2))
  • Filter: ((((tradedatayear)::double precision > date_part('year'::text, (CURRENT_DATE + '-2 years'::interval))) AND ((tradedatayear)::double precision < date_part('year'::text, (CURRENT_DATE)::timestamp without time zone))) OR (((tradedatayear)::double precision = date_part('year'::text, (CURRENT_DATE + '-2 years'::interval))) AND ((tradedatamonth)::double precision >= date_part('month'::text, (CURRENT_DATE)::timestamp without time zone))) OR (((tradedatayear)::double precision = date_part('year'::text, (CURRENT_DATE)::timestamp without time zone)) AND ((tradedatamonth)::double precision <= date_part('month'::text, (CURRENT_DATE)::timestamp without time zone))))
  • Rows Removed by Filter: 4004
  • Heap Blocks: exact=189137
5. 77.080 77.080 ↑ 2.6 4,839 328

Bitmap Index Scan on ix_instntradesummary_sk (cost=0.00..277.41 rows=12,470 width=0) (actual time=0.235..0.235 rows=4,839 loops=328)

  • Index Cond: (keyinstn = ic.keyinstn)
Planning time : 0.363 ms