Gastroscopy requires electrocardiogram (ECG), and ECG is recommended to rule out heart-related diseases no matter whether it is ordinary gastroscopy or painless gastroscopy. 1. Ordinary gastroscopy: Ordinary gastroscopy is a gastroscopy without anesthesia, which is performed when the patient is awake. Gastroscopy is easy to cause nausea, vomiting and other reflexes due to stomach stimulation and throat stimulation, and if there are cardiac underlying diseases such as ischemic cardiomyopathy, arrhythmia and so on, the gastroscopy examination may trigger the attack of such diseases which may endanger the life, so it is recommended to perform electrocardiography to rule out cardiac diseases before the examination of ordinary gastroscopy. 2. Painless gastroscopy: painless gastroscopy is performed under anesthesia, the examination process is painless, the purpose of ECG examination is to exclude the contraindications of anesthesia for patients, for patients with slow heart rate is not suitable for general anesthesia, so as not to lead to cardiac arrest and endangerment of life, so before anesthesia and gastroscopy need to perform ECG examination. It is recommended that patients consult their physicians before performing gastroscopy, perform the relevant examinations under the guidance of the physician, and actively cooperate with the pre-test preparations.