Patients with chronic postoperative pain exhibited a higher risk for dementia compared with those without chronic postoperative pain.