Infosys interview question

How will you optimize a cursor in DB2?