A device for detecting cardiac ischemia is disclosed. The device includes a processor that is configured to distinguish between two different heart beats types such as ventricularly paced beats and supraventricular beats. The processor collects separate reference data for each beat type indicative of the normal values of a cardiac feature associated with these beat types. The processor performs an ischemia test by separately comparing present values of the cardiac feature for each beat type with the reference values for the corresponding beat type.