Whistling while you work may help for Snow White's seven dwarfs, but a new study suggests being in a good mood can actually hurt productivity in some tasks.

Good moods can help in doing creative jobs, but bad moods can actually help in tasks that require more focus, according to a paper published earlier this week by University of Toronto psychologist Adam Anderson.

The study is the first to suggest the potential negative impact of a positive frame of mind.

Anderson asked 24 university students to take two kinds of tests after listening to music or words to alter their mood. Music was used to get users in a happy or sad mood, and to achieve a neutral mood the researchers recited a list of facts about Canada.

In one task designed to test their breadth of thinking and creativity, participants had to think of unusual words.

Participants who listened to happy music and claimed to be in a better mood did better at this test, a finding supported by previous researchthat suggested a positive mood can increase creativity.

But the happy workers took longer with the second test, which asked them to focus on a single letter in a row of letters. Happy-music listeners were 40 per cent more likely than sad-music listeners to be distracted by the peripheral information.

The study suggests being in a bad mood may actually help focus workers on detail-oriented tasks.

Anderson, a Canada research chair in cognitive neuroscience, published his findings in the Dec. 18 issue of the Proceedings of the National Academies of Sciences.