Based on evanescent-wave guiding properties of nanowire waveguides, we propose to use single-mode subwavelength-diameter silica nanowires for optical sensing. Phase shift of the guided mode caused by index change is obtained by solving Maxwell's equation, and is used as a criterion for sensitivity estimation. Nanowire sensor employing a wire-assembled Mach-Zehnder structure is modeled. The result shows that optical nanowires, especially those fabricated by taper drawing of optical fibers, are promising for developing miniaturized optical sensors with high sensitivity.