By sampling the initial result of a query to the database, thereby producing a sampled result which is substantially smaller than the initial result, the sampled result is easier to analyse statistically and is easier to transmit across a communications medium such as a network.