Effect of microstructures on critical current density of textured YBa2Cu3Oy