OP is replacing a sedan, so I suggested a sedan. Mine's been fantastic, and trouble-free for 90K miles. My 2010 Mazda 3 and 2012 Mazda 5 were also totally reliable, which is why I've stayed with them.
I can't speak to the CX9. I don't drive/need an SUV, and despite public popularity, I don't recommend any of them to anyone.