Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- explain analyze select abscurve0_.id,
- abscurve0_.calculationDate,
- abscurve0_.compoundingType,
- abscurve0_.curveType,
- abscurve0_.errorCode,
- abscurve0_.errorMessage,
- abscurve0_.interpolationType,
- abscurve0_.name,
- abscurve0_.rawCurveId
- abscurve0_.absType
- abscurve0_.collateralCountry
- abscurve0_.rating
- from Curve abscurve0_
- where abscurve0_.DTYPE='ABSCurve'
- and (abscurve0_.errorCode is null)
- and abscurve0_.calculationDate=(select max(curve2_.calculationDate)
- from Curve curve2_
- where curve2_.rawCurveId=abscurve0_.rawCurveId);
- QUERY PLAN
- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Index Scan using idx_multi_errorcode_dtype on curve abscurve0_ (cost=0.43..8477493.79 rows=309 width=200) (actual time=46106.159..46737.307 rows=54 loops=1)
- Index Cond: (((dtype)::text = 'ABSCurve'::text) AND (errorcode IS NULL))
- Filter: (calculationdate = (SubPlan 2))
- Rows Removed by Filter: 60688
- SubPlan 2
- -> Result (cost=136.14..136.15 rows=1 width=0) (actual time=0.767..0.767 rows=1 loops=60742)
- InitPlan 1 (returns $1)
- -> Limit (cost=0.43..136.14 rows=1 width=8) (actual time=0.766..0.766 rows=1 loops=60742)
- -> Index Scan Backward using idx_calculationdate on curve curve2_ (cost=0.43..126074.03 rows=929 width=8) (actual time=0.765..0.765 rows=1 loops=60742)
- Index Cond: (calculationdate IS NOT NULL)
- Filter: (rawcurveid = abscurve0_.rawcurveid)
- Rows Removed by Filter: 2683
- Planning time: 0.287 ms
- Execution time: 46737.540 ms
- (14 rows)
- Time: 46739.388 ms
Add Comment
Please, Sign In to add comment