If someone asks us something that we don't know, how can we know so fast that that's the case? Shouldn't we spend a considerable amount of time scanning our memories until we realize the information is unknown?
"There are known knowns; there are things we know that we know. There are known unknowns; that is to say, there are things that we now know we don't know. But there are also unknown unknowns – there are things we do not know we don't know."
This question is difficult to answer because researchers are rarely interested in how it is we know we don't know. Typically, memory researchers are either interested in how we remember, why we forget, and how we confabulate or form false memories. How it is that we can quickly decide "no entry found" is less of a pertinent question. There may be some research out there on the issue but I'm sure it will be very difficult to find. Broadly, however we can think of a potential answer by dividing the problem into two questions; how do we retrieve information, and how do we make judgements about our thoughts (meta-cognition)?
How do we retrieve information? Retrieval is thought to occur when there is a sufficient match between the current input pattern, and a previously encountered input pattern (Tulving, 1983). Sometimes however, the input pattern is merely a partial cue, and successful recognition entails activation of information that is associated with the cue. Activation of semantically related information is thought to occur due to spreading activation throughout a semantic network (Collins & Loftus, 1975). For example, someone asks "Where was JFK killed?" Presumably the partial cue 'JFK' activates related information such as 'John F Kennedy', 'President of USA','Cuba Missile Crisis','Assassinated', 'Texas'.
One property of the encoding-match hypothesis of memory retrieval is that more input information increases the chances that associated information will be activated. This property of memories is that we can use meta-cognitive strategies to facilitate activation of all related information. We do this by attempting think about particular cues, for example we might focus on the details that JFK was shot in an open car, Lee Harvey Oswald shot JFK from a book repository, in the hope that the city name will be activated.
At a certain stage however, we must make the meta-cognitive judgement that activation is not possible. In recognition tasks the standard assumption is that we simply adopt a meta-cognitive strategy of "wait X seconds, if recognition has not occurred, then the information is not present." There is a lot of controversy surrounding this assumption and what it means in memory tasks.
Although this is not a complete answer, I hope it at least sheds light on why we can know that we don't know so quickly. If retrieval is just the reactivation of a previous perceptual state, then recognition should occur at the speed of perception. However, if the cue is only partial, and activation of the target information relies on spreading activation, then recognition will take longer.
Tulving, E. (1983). Elements of episodic memory (p. 123). Oxford: Clarendon Press.
Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. Psychological review, 82(6), 407.
I am not an expert but I think this is because the brain would find existing memories instead of looking for memories that might not be there.
Say you have a good knowledge in C# but don't have that good of a knowledge in C++, but you know the extent of your knowledge.
You'd immediately know you cannot answer a question when asked about a concept in C++ you have not heard of / are not up to yet.
When asked where you last saw someone, you can remember quickly or you can't.
For example, you have a friend that went missing unexpectedly but when you last saw her the confrontation was so casual you can't even remember it.. except that you can.. just slightly.
If you see your friend and give them a quick wave, but are in an area you aren't familiar with (Say a shopping district you've never went to), you'd have a difficult time recalling the PLACE where you found them. This is especially true if you're just acquaintances who just say "Hi" and "Bye!"
But if you are in a grey area, say you've been to a certain place before and saw your friend/acquaintance there, you may not remember or you will remember, that is just subjective. You'd be likely to remember quicker if it was a large event between you two. (Like a wedding!)
All in all, usually when asked that type of question images will flash by while you're saying "Hmm.. umm.. well I think I last saw (him/her) at this place." or you can be unsure and blank out.
Sorry for my inexperience, I am just giving an example to explain what I cannot really formally write.