  We study a pull-based status update communication model where a source node
submits update packets to a channel with random transmission delay, at times
requested by a remote destination node. The objective is to minimize the
average query-age-of-information (QAoI), defined as the average
age-of-information (AoI) measured at query instants that occur at the
destination side according to a stochastic arrival process. In reference to a
push-based problem formulation defined in the literature where the source
decides to \textit{update or wait} at will, with the objective of minimizing
the time average AoI at the destination, we name this problem the
\textit{Pull-or-Wait} (PoW) problem. We provide a comparison of the two
formulations: (i) Under Poisson query arrivals, an optimal policy that
minimizes the time average AoI also minimizes the average QAoI, and these
minimum values are equal; and (ii) the optimal average QAoI under periodic
query arrivals is always less than or equal to the optimal time average AoI. We
identify the PoW problem in the case of a single query as a stochastic shortest
path (SSP) problem with uncountable state and action spaces, which has been not
solved in previous literature. We derive an optimal solution for this SSP
problem and use it as a building block for the solution of the PoW problem
under periodic query arrivals.
