In this paper we address the problem of batching orders in a warehouse, with the objective of minimizing the total travel time. Order batching is an NP-hard optimization problem that is very difficult to solve exactly in practice. Thus, most implemented solutions are based on elementary heuristic methods that perform a relatively limited exploration of the solution space. As an alternative, we propose a heuristic based on variable neighborhood search, where the emphasis is placed on performing an intensive exploration of the most promising regions of the solution space. Simulations are conducted to study the performance of the method with different warehouse configurations, and an exhaustive comparative analysis, which considers all the best known heuristics, is carried out. The results obtained show that the proposed heuristic is competitive and that it provides a suitable method which can be used in practice. Additionally, since the performance of the algorithms depends heavily on factors such as storage policy, routing strategies, or the structure of the orders, we have developed an ANOVA in order to consider the effect of all the above factors on the different methods tested.