1. A method for determining a window size for outlier detection in a time series of a database system, said method comprising: calculating strength values for data points using a set of window sizes, resulting at least in one set of strength values for each window size, said strength values increasing as a distance between a value of a respective data point and a local mean value increases; calculating, for each set of strength values, a weighted sum based on the respective set of strength values using a weighting function suppressing effect of largest strength values, and selecting a window size based on said weighted sum.