tag:blogger.com,1999:blog-29815492.post6433843425251797947..comments2019-02-25T02:29:45.360-08:00Comments on SAS Programming for Data Mining: Fast SQL moving average calculation without windowing functionsLiang Xiehttps://plus.google.com/113551607685648063019noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-29815492.post-54516875787895710002015-05-25T17:42:12.583-07:002015-05-25T17:42:12.583-07:00Yes, self-join is O(N^2) and both the new method a...Yes, self-join is O(N^2) and both the new method and EXPAND is O(N). Expand is more efficient as it is based on pptimized C routines.Liang Xiehttps://www.blogger.com/profile/02274752582289554390noreply@blogger.comtag:blogger.com,1999:blog-29815492.post-47988733932630361912015-05-13T06:14:04.167-07:002015-05-13T06:14:04.167-07:00Great post! I guess that the time complexity of th...Great post! I guess that the time complexity of the original self-joining is O(K*N*N) where K is the window size and N is the number of data. N^2 is spent on self-joining, and K is used for the avg() function. Now the new method reduces it to O(K*K*N).<br /><br />PROC EXPAND is either O(K*N) or O(N). <br />CHARLIE HUANGhttps://www.blogger.com/profile/07804101340982010383noreply@blogger.com