Objective To analyze the anesthetic effect of dexmedetomidine in painless gastroscopy.Methods: 80 patients with painless gastroscopy admitted to our hospital from January 2020 to July 2021 were selected as study samples, and were divided into the experimental group and the reference group by double blind method, with 40 patients in each group. The patients in the experimental group received dexmedetomidine anesthesia, and the patients in the reference group received propofol anesthesia.The changes of vital signs (systolic blood pressure, diastolic blood pressure, heart rate) before and during the examng thereference group, with significant differences (P<0.05), indicating that the vital signs of the patients in the experimental group were more stable; The time related indexes in the experimental group were shorter than those in the control group (P<0.05); There was no significant difference in the incidence of adverse reactions in the experimental group (P>0.05).Conclusion: The effect of dexmedetomidine anesthesia in painless gastroscopic patients is significant, and it can obtain good anesthetic effect.The stress reaction of patients during the examination is relatively mild, and the safety is high, which is worthy of promotion.