Parecoxib, a selective cyclooxygenase-2 inhibitor, is used for its analgesic and antiinflammatory effects, but its impact on postoperative anxiety and cognitive function is not clear.<h4>Methods</h4>The patients undergoing laparoscopic pancreaticoduodenectomy at the Second Hospital of Hebei Medical University were enrolled in the study from November 1, 2020 to September 30, 2022 in this randomized controlled trial. Here, PTGS2 is linked to Anxiety.