Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXUaI-0001Zh-6g for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 20:29:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXUaG-0001Xq-6q for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 20:29:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXUaF-0001Xi-R3 for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 20:29:11 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mXUaB-0002m3-GN for pgsql-general@postgresql.org; Mon, 04 Oct 2021 20:29:11 +0000 Received: by mail-ed1-x529.google.com with SMTP id p11so16797628edy.10 for ; Mon, 04 Oct 2021 13:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9zojSZfuSFNxAU5oq80T2NR0n4Jn8eN0NGzm0UTDd8s=; b=RZbeS3z4DB93IyKJjOXdOogU8D7Cs1EFQcmarTBePCcEgLR2ahmPsb3vL+7SptXXSP HJBweRdNIq8QqkHaYpDXqp/hChIbU26csLe80A0w8LLldOcYqef27F3LZlVnJQXBHd29 0FlWuOcWTxp5uLvy8LQY7c+jcUgmBjMHdwuQ8Jwu/oG5YcMEMlsiwBBcaohBSQ+OIbv0 6tFU0hxZ0zO8ocykYE6qQYy9LtEUPeKGzwH+Wtk+sx/pBcMDqeEPRC1kKv/JgSP+z5pa 604A57l/LgG8+Xb9ATrfsTCgzRiypW4kghsX58GanLVJF8is6ln5QNv/+AcqWSJy+ioF Hstw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9zojSZfuSFNxAU5oq80T2NR0n4Jn8eN0NGzm0UTDd8s=; b=jok19i5EGzBuXRQFNHsTwGKhJ/vrztIztTFr05HuPNicm35DYnIqYBT2XNhrwY3yhm G3QQBbbrRV+REqRoBgkJOCyhFc5/9buoo3PaLFijMIh0ozaksUMqFyEQ7B9+vl4GfMTA FI5fUPmOd/yli/copZ3xJ85eLxCemS/vZLJQF+pEyq/tVBe66OVCpEsP+m48b2nbk/yG zsCXM2hsCWkLKVogx3JyTfUuCMitpGtUWO/HOIkSZI7+z02pSxvXq/LV3kTt0QcX8dGL lGeoFeLzTkYrJxF4G/BK3dH7s/2G+CpzsrKmIrc5TSRTS52uh9XbPetQdYM8elWQhadT HRJg== X-Gm-Message-State: AOAM5332lvq3jH4xUN9var2UA5sG2D5aan5B9CcUdXDsN5rTn+elZM9I HO1TVX+YRKZID7IINBi6cRf+zrRgAaVNSg== X-Google-Smtp-Source: ABdhPJwjqyuDWHmY4/BgdrPyIaPrTFS++ree8Cti0hphNj1pgpSuBxvzURy+tf9LRqxQqRwGEV7oaA== X-Received: by 2002:a05:6402:1d04:: with SMTP id dg4mr20543584edb.183.1633379346504; Mon, 04 Oct 2021 13:29:06 -0700 (PDT) Received: from hollewijn.internal (217-19-30-105.dsl.cambrium.nl. [217.19.30.105]) by smtp.gmail.com with ESMTPSA id v13sm569976ede.79.2021.10.04.13.29.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Oct 2021 13:29:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Growth planning From: Alban Hertroys In-Reply-To: <35170FC5-0A05-48F3-9ED1-F007CC1AF365@alaska.edu> Date: Mon, 4 Oct 2021 22:29:05 +0200 Cc: PostgreSQL Mailing Lists Content-Transfer-Encoding: quoted-printable Message-Id: <5F0C1A8D-F199-497A-B7FA-8143E48BB020@gmail.com> References: <35170FC5-0A05-48F3-9ED1-F007CC1AF365@alaska.edu> To: Israel Brewster X-Mailer: Apple Mail (2.3608.120.23.2.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 4 Oct 2021, at 18:22, Israel Brewster = wrote: (=E2=80=A6) > the script owner is taking about wanting to process and pull in =E2=80=9C= all the historical data we have access to=E2=80=9D, which would go back = several years, not to mention the probable desire to keep things running = into the foreseeable future. (=E2=80=A6) > - The largest SELECT workflow currently is a script that pulls all = available data for ONE channel of each station (currently, I suspect = that will change to all channels in the near future), and runs some = post-processing machine learning algorithms on it. This script (written = in R, if that makes a difference) currently takes around half an hour to = run, and is run once every four hours. I would estimate about 50% of the = run time is data retrieval and the rest doing its own thing. I am only = responsible for integrating this script with the database, what it does = with the data (and therefore how long that takes, as well as what data = is needed), is up to my colleague. I have this script running on the = same machine as the DB to minimize data transfer times. I suspect that a large portion of time is spent on downloading this data = to the R script, would it help to rewrite it in PL/R and do (part of) = the ML calculations at the DB side? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.