Abstract:Objective To compare the efficacy and safety of remimazolam combined with alfentanil or esketamine for sedation during painless gastrointestinal endoscopy in elderly patients.Methods 200 elderly patients undergoing painless gastrointestinal endoscopy from October 2024 to July 2025 were selected and randomly divided into a remimazolam and alfentanil combination group (RA group, n = 100) and a remimazolam and esketamine combination group (RE group, n = 100). The incidence of body movement reactions, physician satisfaction, awakening time, orientation restoration time, discharge from the recovery room time, hemodynamic parameters, and incidence of adverse reactions were observed during the procedure.Results The incidence of body movement reactions in the RE group was significantly lower than that in the RA group (5.0% vs. 19.0%), and the endoscopic physician satisfaction score was also significantly higher in the RE group, the difference was statistically significant (P 0.05). During the procedure, the RE group maintained more stable mean arterial pressure (MAP) and heart rate (HR), with significantly lower incidences of hypotension (5.0% vs. 15.0%) and respiratory depression (3.0% vs. 12.0%) compared to the RA group, the differences were statistically significant (P 0.05). There were no statistically significant differences between the two groups in awakening time, orientation restoration time, and other complications incidence rate (P 0.05).Conclusion In the process of painless gastrointestinal endoscopy for elderly patients, remimazolam combined with esketamine provides superior analgesia and procedural conditions compared to remimazolam combined with alfentanil, significantly enhancing hemodynamic stability and improving safety. It is a worthy clinical application.