explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VET7

Settings
# exclusive inclusive rows x rows loops node
1. 0.481 63.617 ↓ 3.7 6,370 1

Limit (cost=18,877,454.76..18,877,459.10 rows=1,735 width=409) (actual time=61.019..63.617 rows=6,370 loops=1)

2. 22.406 63.136 ↓ 3.7 6,370 1

Sort (cost=18,877,454.76..18,877,459.10 rows=1,735 width=409) (actual time=61.019..63.136 rows=6,370 loops=1)

  • Sort Key: fi.periodenddate DESC
  • Sort Method: external merge Disk: 3216kB
3. 7.526 40.730 ↓ 3.7 6,370 1

Nested Loop (cost=2.57..18,877,361.41 rows=1,735 width=409) (actual time=2.712..40.730 rows=6,370 loops=1)

4. 2.354 20.464 ↓ 3.7 6,370 1

Nested Loop (cost=2.28..18,863,781.69 rows=1,735 width=189) (actual time=2.705..20.464 rows=6,370 loops=1)

5. 8.408 14.457 ↓ 2.3 281 1

Nested Loop (cost=1.57..2,000.44 rows=120 width=162) (actual time=2.688..14.457 rows=281 loops=1)

  • Join Filter: (fc.currencyid = c.currencyid)
  • Rows Removed by Join Filter: 64630
6. 0.043 0.043 ↑ 1.0 231 1

Seq Scan on ciqcurrency c (cost=0.00..4.31 rows=231 width=30) (actual time=0.006..0.043 rows=231 loops=1)

7. 4.821 6.006 ↓ 2.3 281 231

Materialize (cost=1.57..1,580.63 rows=120 width=132) (actual time=0.003..0.026 rows=281 loops=231)

8. 0.060 1.185 ↓ 2.3 281 1

Nested Loop (cost=1.57..1,580.03 rows=120 width=132) (actual time=0.702..1.185 rows=281 loops=1)

9. 0.032 0.870 ↓ 1.9 17 1

Nested Loop (cost=1.00..863.93 rows=9 width=112) (actual time=0.695..0.870 rows=17 loops=1)

10. 0.110 0.110 ↓ 2.0 104 1

Index Scan using ix_ciqfinperiod_companyid_periodtypeid on ciqfinperiod fp (cost=0.43..181.37 rows=51 width=34) (actual time=0.016..0.110 rows=104 loops=1)

  • Index Cond: ((companyid = 105612) AND (periodtypeid = 2))
11. 0.728 0.728 ↓ 0.0 0 104

Index Scan using ix_ciqfininstance on ciqfininstance fi (cost=0.56..13.37 rows=1 width=78) (actual time=0.007..0.007 rows=0 loops=104)

  • Index Cond: (financialperiodid = fp.financialperiodid)
  • Filter: ((filingdate >= '2016-01-23 00:00:00'::timestamp without time zone) AND (latestforfinancialperiodflag = 1))
  • Rows Removed by Filter: 4
12. 0.255 0.255 ↑ 17.6 17 17

Index Scan using ix_ciqfincollection on ciqfincollection fc (cost=0.57..76.57 rows=300 width=20) (actual time=0.006..0.015 rows=17 loops=17)

  • Index Cond: (financialinstanceid = fi.financialinstanceid)
13. 3.653 3.653 ↑ 2,238.8 23 281

Index Scan using pk_ciqfincollectiondata on ciqfincollectiondata cd (cost=0.71..156,666.59 rows=51,492 width=27) (actual time=0.005..0.013 rows=23 loops=281)

  • Index Cond: (financialcollectionid = fc.financialcollectionid)
14. 12.740 12.740 ↑ 1.0 1 6,370

Index Scan using pk_ciqdataitem on ciqdataitem di (cost=0.29..7.82 rows=1 width=220) (actual time=0.002..0.002 rows=1 loops=6,370)

  • Index Cond: (dataitemid = cd.dataitemid)