Techniques are provided for use by implantable medical devices for controlling ventricular pacing, particularly during atrial fibrillation. In one example, during a V sense test for use in optimizing ventricular pacing, the implantable device determines relative degrees of variation within antecedent and succedent intervals detected between ventricular events sensed on left ventricular (LV) and right ventricular (RV) sensing channels. Preferred or optimal ventricular pacing delays are then determined, in part, based on a comparison of the relative degrees of variation obtained during the V sense test. In another example, during RV and LV pace tests, the device distinguishes QRS complexes arising due to interventricular conduction from QRS complexes arising due to atrioventricular conduction from the atria, so as to permit the determination of correct paced interventricular conduction delays for the patient. The paced interventricular conduction delays are also used to optimize ventricular pacing. Biventricular and monoventricular pacing regimes are provided.