ObjectiveTo compare the application effect of remimazolam tosilate combined with fentanyl or propofol combined with fentanyl in the diagnosis and treatment of painless gastroscopy in elderly patients. MethodsA total of 66 elderly patients who underwent painless gastroscopy for diagnosis and treatment were randomly assigned to study group or control group, with 33 cases in each group. On the basis of receiving 50 μg fentanyl for analgesic preconditioning, intravenous pumping with remimazolam tosilate and propofol were given to patients in the study and control groups before endoscopic entry procedure, and corresponding drugs were added as needed during operation. The heart rate, blood pressure, respiratory frequency, pulse oxygen saturation (SpO2) at T0 (entry of the endoscope room), T1 (immediately after administration), T2 (two minutes after administration), T3 (five minutes after administration), T4 (eight minutes after administration), T5 (11 minutes after administration), T6 (14 minutes after administration), and T7 (awake), as well as the Modified Observer′s Assessment of Alertness and Sedation (MOAA/S) scale score at T1, T2, T3, T4, T5, and T6 were compared between patients of the two groups. Time to sedation induction, endoscopic operation duration, anesthesia duration, sedation recovery time, and intra- and post-operative occurrence of adverse reactions were recorded in the two groups. ResultsThere was a trend in heart rate over time in both groups (P<0.05), but there was no statistically significant difference between the two groups (P>0.05). Systolic blood pressure, diastolic blood pressure, respiratory frequency, and SpO2 of the two groups had a trend of change with time (P<0.05), and the study group yielded higher systolic blood pressure, respiratory frequency, and SpO2 at T2 and T3, as well as higher diastolic blood pressure at T2 as compared with the control group (P<0.05). The study group exhibited a higher score of MOAA/S scale at T2 as compared with the control group (P<0.05), but no statistically significant difference in MOAA/S scale score at the remaining time points was found between the two groups (P>0.05). There was no statistically significant difference in anesthesia duration, endoscopic operation duration, sedation induction time, sedation recovery time between the two groups (P>0.05). The study group interpreted lower incidence rates of hypotension and respiratory depression as compared with the control group (P<0.05). ConclusionApplication of remimazolam tosilate or propofol combined with fentanyl to painless gastroscopy examination in the elderly can all exert effective sedative effects, but patients obtain more stable hemodynamics, lower incidence rates of hypotension and respiratory depression, and higher safety when employing remimazolam tosilate.