Skip to content

Instantly share code, notes, and snippets.

@arp242
Created January 14, 2020 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arp242/92b492be6823af71f9e8d24bbc774f71 to your computer and use it in GitHub Desktop.
Save arp242/92b492be6823af71f9e8d24bbc774f71 to your computer and use it in GitHub Desktop.
do
$do$
begin
for i in 1..100 loop
update hit_stats hs_outer
set title=(select title from hit_stats where hit_stats.site=hs_outer.site and hit_stats.path=hs_outer.path order by hit_stats.day desc limit 1)
where title='' and site=i;
perform pg_sleep(5);
end loop;
end
$do$;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment