In general, the invention provides for commencing an atrioventricular (AV) search in response to an indicator of an autonomic nervous system (ANS) activity. An implantable medical device (IMD) may be configured to apply this technique, and also to apply rate adaptive ventricular pacing. In response to ANS activity such as an abrupt increase in cardiac sympathetic nervous activity, the IMD performs an AV search to find the intrinsic AV interval of the patient. The invention includes selection of a maximum AV delay so that the AV search will not adversely affect hemodynamic function.