I want to look at the intervals between successive revisions. I tried (against enwiki_p):
select rev_id, rev_timestamp, lag(rev_timestamp) over (order by rev_id) from revision limit 5;
but that's running for a long time; I assume it'll time out eventually. It's as if it were doing a full table scan. What am I doing wrong?