The factors associated with hyperglycemia were complexity of baseline pathology, duration of anesthesia, duration of cardiopulmonary bypass, aortic crossing time, intra-operative use of corticosteroids and vasoactive drugs.