A wall carving is more likely to last longer.
A carving in a cave, maybe. A carving on the wall of a building, probably not. All it takes is for that building to be knocked down, and the information is lost. With a book, every single copy ever made would need to be destroyed to lose the information.