  We prove that $n$-dimensional ($n\geqslant3$) complete and non-compact metric
measure spaces with non-negative weighted Ricci curvature in which some
Caffarelli-Kohn-Nirenberg type inequality holds are close to the model metric
measure $n$-space (i.e., the Euclidean metric $n$-space).
