The surge of emotion that makes memories of embarrassment, triumph and disappointment so vivid can also reach back in time, strengthening recall of seemingly mundane things that happened just beforehand and that, in retrospect, are relevant, a new study has found.

The report, published Wednesday in the journal Nature, suggests that the television detective’s standard query — “Do you remember any unusual behavior in the days before the murder?” — is based on solid brain science, at least in some circumstances.

The findings fit into the predominant theory of memory: that it is an adaptive process, continually updating itself according to what knowledge may be important in the future.

The new study suggests that human memory has, in effect, a just-in-case file, keeping seemingly trivial sights, sounds and observations in cold storage for a time in case they become useful later on.