The project, led by researchers at the University of Queensland, tracked 20 years of data from 30,000 patients across the world.
Ageing and geriatric medicine specialist David Ward said by understanding the connection doctors could "use targeted strategies to reduce the risk of developing the condition and improve general quality of life".
Dementia affects thinking and behaviour and is often caused by a neurodegenerative illness.