Pregnant sows were housed in dynamic, twice-mixed, and static groups of different sizes in pens with electronic sow feeders (ESFs) to study the effect of group size and structure on sow welfare and performance. The total injury score (TIS) was significantly higher (P < 0.05) in the dynamic group than in the other groups in general and 2 wk after mixing. The salivary cortisol concentrations were similar in the 3 groups. The frequency of queuing was significantly higher (P < 0.05) in the twice-mixed group and the frequency of nonagonistic social interactions significantly lower (P < 0.05) in the dynamic group. The total number of aggressive acts was positively and significantly correlated (P < 0.05) with the frequency and duration of queuing in all the groups. Farrowing performance and longevity did not differ between the groups. The higher TIS and lower number of nonagonistic social interactions indicated that welfare was compromised in the dynamic group as compared with the other groups.