A computer-implemented method comprising: obtaining input data, the input data being a time series dataset comprising a plurality of data values, wherein each data value is associated with a time value; obtaining a plurality of threshold criteria; (a) selecting a dataset which is a subset of the input data and comprises not all of the plurality of data values from the input data, wherein selecting the dataset comprises iteratively: (i) selecting data from the input data for the selected dataset, and (ii) determining whether the union of the selected dataset with the previously stored datasets meets a threshold criterion of the plurality of threshold criteria, until said union meets said threshold criterion; and (b) causing the selected dataset to be stored in memory in association with the threshold criterion; repeating (a) and (b) for each threshold criterion of the plurality of threshold criteria (106, 107), thus causing a plurality of datasets to be stored in the memory, wherein the union of each stored dataset with the previously stored datasets meets a threshold criterion of the plurality of threshold criteria; and in response to a request including at least one indicator of a threshold criterion, returning a union of the datasets stored in memory meeting said threshold criterion; wherein each stored dataset comprises a plurality of data values and an indication of the time value associated with each one of the plurality of data values; and wherein each threshold criterion is a desired level of similarity or fidelity between a dataset and the input data, or a desired level of accuracy with which a dataset represents the input data. obtaining input data, the input data being a time series dataset comprising a plurality of data values, wherein each data value is associated with a time value; obtaining a plurality of threshold criteria; (a) selecting a dataset which is a subset of the input data and comprises not all of the plurality of data values from the input data, wherein selecting the dataset comprises iteratively: (i) selecting data from the input data for the selected dataset, and (ii) determining whether the union of the selected dataset with the previously stored datasets meets a threshold criterion of the plurality of threshold criteria, until said union meets said threshold criterion; and (b) causing the selected dataset to be stored in memory in association with the threshold criterion; (a) selecting a dataset which is a subset of the input data and comprises not all of the plurality of data values from the input data, wherein selecting the dataset comprises iteratively: (i) selecting data from the input data for the selected dataset, and (ii) determining whether the union of the selected dataset with the previously stored datasets meets a threshold criterion of the plurality of threshold criteria, until said union meets said threshold criterion; and (i) selecting data from the input data for the selected dataset, and (ii) determining whether the union of the selected dataset with the previously stored datasets meets a threshold criterion of the plurality of threshold criteria, (b) causing the selected dataset to be stored in memory in association with the threshold criterion; repeating (a) and (b) for each threshold criterion of the plurality of threshold criteria (106, 107), thus causing a plurality of datasets to be stored in the memory, wherein the union of each stored dataset with the previously stored datasets meets a threshold criterion of the plurality of threshold criteria; and in response to a request including at least one indicator of a threshold criterion, returning a union of the datasets stored in memory meeting said threshold criterion; wherein each stored dataset comprises a plurality of data values and an indication of the time value associated with each one of the plurality of data values; and wherein each threshold criterion is a desired level of similarity or fidelity between a dataset and the input data, or a desired level of accuracy with which a dataset represents the input data.