Guest User

Untitled

a guest
Feb 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. explain analyze select abscurve0_.id,
  2. abscurve0_.calculationDate,
  3. abscurve0_.compoundingType,
  4. abscurve0_.curveType,
  5. abscurve0_.errorCode,
  6. abscurve0_.errorMessage,
  7. abscurve0_.interpolationType,
  8. abscurve0_.name,
  9. abscurve0_.rawCurveId
  10. abscurve0_.absType
  11. abscurve0_.collateralCountry
  12. abscurve0_.rating
  13. from Curve abscurve0_
  14. where abscurve0_.DTYPE='ABSCurve'
  15. and (abscurve0_.errorCode is null)
  16. and abscurve0_.calculationDate=(select max(curve2_.calculationDate)
  17. from Curve curve2_
  18. where curve2_.rawCurveId=abscurve0_.rawCurveId);
  19.  
  20. QUERY PLAN
  21. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  22. 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)
  23. Index Cond: (((dtype)::text = 'ABSCurve'::text) AND (errorcode IS NULL))
  24. Filter: (calculationdate = (SubPlan 2))
  25. Rows Removed by Filter: 60688
  26. SubPlan 2
  27. -> Result (cost=136.14..136.15 rows=1 width=0) (actual time=0.767..0.767 rows=1 loops=60742)
  28. InitPlan 1 (returns $1)
  29. -> Limit (cost=0.43..136.14 rows=1 width=8) (actual time=0.766..0.766 rows=1 loops=60742)
  30. -> 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)
  31. Index Cond: (calculationdate IS NOT NULL)
  32. Filter: (rawcurveid = abscurve0_.rawcurveid)
  33. Rows Removed by Filter: 2683
  34. Planning time: 0.287 ms
  35. Execution time: 46737.540 ms
  36. (14 rows)
  37.  
  38. Time: 46739.388 ms
Add Comment
Please, Sign In to add comment