Penny-wise and pound-foolish.

捡了芝麻而丢了西瓜。