OBJECTIVE To assess the ability to identify potential association(s) of diabetes medications with myocardial infarction using usual care clinical data obtained from the electronic medical record. RESEARCH DESIGN AND METHODS We defined a retrospective cohort of patients (n = 34,253) treated with a sulfonylurea, metformin, rosiglitazone, or pioglitazone in a single academic health care network. All patients were aged >18 years with at least one prescription for one of the medications between 1 January 2000 and 31 December 2006. The study outcome was acute myocardial infarction requiring hospitalization. We used a cumulative temporal approach to ascertain the calendar date for earliest identifiable risk associated with rosiglitazone compared with that for other therapies. RESULTS Sulfonylurea, metformin, rosiglitazone, or pioglitazone therapy was prescribed for 11,200, 12,490, 1,879, and 806 patients, respectively. A total of 1,343 myocardial infarctions were identified. After adjustment for potential myocardial infarction risk factors, the relative risk for myocardial infarction with rosiglitazone was 1.3 (95% CI 1.1-1.6) compared with sulfonylurea, 2.2 (1.6-3.1) compared with metformin, and 2.2 (1.5-3.4) compared with pioglitazone. Prospective surveillance using these data would have identified increased risk for myocardial infarction with rosiglitazone compared with metformin within 18 months of its introduction with a risk ratio of 2.1 (95% CI 1.2-3.8). CONCLUSIONS Our results are consistent with a relative adverse cardiovascular risk profile for rosiglitazone. Our use of usual care electronic data sources from a large hospital network represents an innovative approach to rapid safety signal detection that may enable more effective postmarketing drug surveillance.