Novel by Nicholson Baker -- the entire text occurs during the main character's ride up an escalator, following his stream-of-consciousness and the generated sub-references.

followup due to Gritchka's WU: I guess I misused stream-of-consciousness in its technical meaning. I intended it to mean what the character was thinking about, and the train of thought, all the minutiae and little stories. That's how most people think, I think. But maybe I'm just weird.

And I am about 90% sure that the narrative starts just as he approaches the escalator, and finishes as he gets off (though I remember that it snakes back to some previous details just to fill in plot).