This paper studies how search externalities and wage bargaining distort vacancy creation and the allocation of workers to jobs in markets with two-sided heterogeneity. To do so, I propose a model of a frictional labor market where heterogeneous workers decide which job to look for and firms decide which technology to adopt. In equilibrium, there is perfect segmentation across sectors, which is determined by a unique threshold of workers' productivity. This threshold is inefficient due to participation and composition externalities. The Pigouvian tax scheme that decentralizes optimal sorting shows that these externalities have opposite signs. Furthermore, their relative strength depends on the distribution of workers' skills, so that when there are many (few) skilled workers, too many (few) high technology jobs are created.