The trade literature has long discussed the existence of some benefits attributed to exporting, among others, the improvement of firm productivity. This paper examines whether firm size plays a role in this supposedly favourable relationship between exporting and total factor productivity (TFP). To examine this, we investigate, separately for large and small firms, whether firms starting to export perform better ex ante (self-selection) than non-exporting firms and, conditional on this fact, if they are also more productive ex post (learning-by-exporting). With this purpose, we use both stochastic dominance and matching techniques. The dataset is a representative sample of Spanish manufacturing firms drawn from the Encuesta sobre Estrategias Empresariales for 1990–2002. Our results shed light on the importance of considering differences in firm size when analysing both self-selection into exporting and post-entry productivity changes. They confirm the existence of a binding process of self-selection into exporting among small firms, but not among large firms. Post-entry productivity growth, although with different time patterns, is significant both for small and large firms.