This experiment investigated whether domestic pigs can remember the locations of food sites of different relative value, and how a restricted retrieval choice affects their foraging behaviour. Nine juvenile female pigs were trained to relocate two food sites out of a possible eight in a spatial memory task. The two baited sites contained different amounts of food and an obstacle was added to the smaller amount to increase handling time. On each trial, a pig searched for the two baited sites (search visit). Once it had found and eaten the bait, it returned for a second (relocation) visit, in which the two same sites were baited. Baited sites were changed between trials. All subjects learnt the task. When allowed to retrieve both baits, the subjects showed no preference for retrieving a particular one first (experiment 1). When they were allowed to retrieve only one bait, a significant overall preference for retrieving the larger amount emerged across subjects (experiment 2). To test whether this preference reflected an avoidance of the obstacle with the smaller bait, 15 choice-restricted control trials were conducted. In control trials obstacles were present with both baits. Pigs continued to retrieve the larger bait, indicating they had discriminated between the two food sites on the basis of quantity or profitability and adjusted their behaviour accordingly when the relocation choice was restricted. This suggests for the first time that domestic pigs have the ability to discriminate between food sites of different relative value and to remember their respective locations.