Bounds for partial derivatives: necessity of UMD and sharp constants