1. A method comprising, by a computer system: receiving a request to execute a database statement in satisfaction of a time constraint, wherein the database statement specifies a distributed database as a data source; determining a pattern of the database statement based, at least in part, on an analysis of syntax in the database statement; comparing the pattern to stored pattern metadata associated with cached samples of the distributed database; wherein, for each cached sample of the cached samples, the stored pattern metadata characterizes an assortment of data values stored in the cached sample; responsive to a determination that the comparing has resulted in one or more matches between the pattern and the stored pattern metadata, selecting a target sample from among the cached samples; causing the database statement to be executed on the target sample; responsive to a determination that the target sample resolves the database statement in satisfaction of the time constraint, returning a resulting dataset to a requestor; and responsive to a determination that the target sample does not resolve the database statement satisfaction in of the time constraint, causing a new real-time sampling of the distributed database to be executed.