Last active
July 30, 2016 08:26
-
-
Save x4m/fee16ed1a55217528f036983d88771b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\timing | |
SET client_min_messages = 'DEBUG5'; | |
SET log_min_messages = 'DEBUG5'; | |
SET wal_level = 'minimal'; | |
begin transaction; | |
SELECT setseed(.43); | |
CREATE TABLE avg_test AS SELECT (random() * 999)::decimal(5,2) as d FROM | |
generate_series(1, 1000000) s; | |
SELECT avg(d) a | |
, avg(d+0) s0 | |
, avg(d+1) s1 | |
, avg(d+2) s2 | |
, avg(d+3) s3 | |
, avg(d+4) s4 | |
, avg(d+5) s5 | |
, avg(d+6) s6 | |
, avg(d+7) s7 | |
, avg(d+8) s8 | |
, avg(d+9) s9 | |
FROM avg_test; | |
rollback; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment