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 1mXVPC-00047I-BD for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 21:21:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXVPB-00068l-AW for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 21:21:49 +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 1mXVPB-00068Q-0K for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 21:21:49 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mXVP9-0003BB-3a for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 21:21:48 +0000 Received: by mail-pj1-x102e.google.com with SMTP id kk10so3221052pjb.1 for ; Mon, 04 Oct 2021 14:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=27YNNhtnT1NjWCDOaPCDmLY1ML0JeEqSjBVcYZxC48U=; b=ET+4ic9N74IwxXXZr0nWTG5QUpCo5FAs4kbaq9EQIKVnKNts8B32e3bIhQpdDy+0CL X1wEw6+texRFm9LCgB1hJuKvWf4aq6nwQraE70D+pdsiBCNgP885/PPbJhMfx/rWsvRv HEQ0zsZdKhOBA24cmgavR+FSsjLMoZA5r+jvXaD/k8qnhsnLq+diEwiHDK/v21/IDnld XzYGEIPTyZRTHsAnO8IAYdHeFZlKSmUk3p3OHehFXYfx+Apg+x0ke9SRuJBTRMbMmoJc jRI/pDUUUcyTKoE2J8j4n0xwDo90TcxzeqTHvboR58Sd4Jr07giSmfQe8cVcuNKVisOe F2qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=27YNNhtnT1NjWCDOaPCDmLY1ML0JeEqSjBVcYZxC48U=; b=TxjHEoQpgxSoSxgla7oeILYBioNyM36jeRlZkQsV4zfz8SLryRfTcj8raBH3y/PJEW A+h9AZ9hDr3cY3eFVfC/MsHEEC+BOAn9Ak6ra4ORPf90rgVRihND/73oicXJN0kuOMDJ ljiv+cOuMt72pJ11jHPAGgRr6I0YiWOBLtnEHPRUgbgx7gSLAQtp9bfdqO7iZ4VuBSlp uj0NPVlzWjPpg6Dj/MQPBl+1S2IPTWg/hdEQ276xlPsulaOex6vB01Uuf9ZCYlts5tR+ 5x5glgx2V9MnLEL//W4PW45YM/bPH0ozIiaEzCzYOxvZNXgK/SYPG3dcvUoKnTv983t3 jiTA== X-Gm-Message-State: AOAM531e8ITWbHt517cqg4ksjIE0q3EYC8JALEIrkZv/vxovWttv+TDw QmZzgfB6tjpB9cN5FMDxzv6WH/4XCtY= X-Google-Smtp-Source: ABdhPJzFaMZlBRDWzz8Eo96U+KRJAymGKmcmLRoCveWt5TIKqpRUjC72dz1ZAClzhJikskI2I0ocGQ== X-Received: by 2002:a17:90b:4a45:: with SMTP id lb5mr11756379pjb.94.1633382504921; Mon, 04 Oct 2021 14:21:44 -0700 (PDT) Received: from [10.104.85.197] ([155.100.47.5]) by smtp.gmail.com with ESMTPSA id s23sm9054469pfh.146.2021.10.04.14.21.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Oct 2021 14:21:44 -0700 (PDT) Subject: Re: Growth planning To: pgsql-general@lists.postgresql.org References: <35170FC5-0A05-48F3-9ED1-F007CC1AF365@alaska.edu> <39A75BC4-7F4D-45F9-BD66-891F0294A072@gmail.com> <8583b994-130a-71a9-c4a6-73cf953ac7f6@gmail.com> <385952B2-FB40-4613-ADEA-D583F7ED6B8B@alaska.edu> From: Rob Sargent Message-ID: Date: Mon, 4 Oct 2021 15:21:43 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <385952B2-FB40-4613-ADEA-D583F7ED6B8B@alaska.edu> Content-Type: multipart/alternative; boundary="------------D39CB16B5071792B2C49186C" Content-Language: en-CA List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------D39CB16B5071792B2C49186C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 10/4/21 3:09 PM, Israel Brewster wrote: >> On Oct 4, 2021, at 12:46 PM, Ron > > wrote: >> >> On 10/4/21 12:36 PM, Israel Brewster wrote: >> [snip] >>> Indeed. Table per station as opposed to partitioning? The *most* I >>> can reasonably envision needing is to query two stations, i.e. I >>> could see potentially wanting to compare station a to some >>> “baseline” station b. In general, though, the stations are >>> independent, and it seems unlikely that we will need any >>> multi-station queries. Perhaps query one station, then a second >>> query for a second to display graphs for both side-by-side to look >>> for correlations or something, but nothing like that has been >>> suggested at the moment. >>> >> >> Postgresql partitions *are* tables.  What if you partition by station >> (or range of stations)? > > Yeah, that’s what I thought, but Rob had said “Table per station”, so > I wasn’t sure if he was referring to *not* using partitioning, but > just making “plain” tables. > > Regardless, I intend to try portioning by station sometime this week, > to see how performance compares to the “one big table” I currently > have. Also to figure out how to get it set up, which from what I’ve > seen appears to be a bit of a pain point. > --- > My "strict" table per station suggestion was meant as an option to avoid the partitioning pain point entirely if it wasn't going to buy you anything. Namely querying more than one station's data. In a write-once scenario such as this,  would a "clustered index" on datetime be stable, performant?  Seems a read-for-export could put the head down at time point A and just go? --------------D39CB16B5071792B2C49186C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 10/4/21 3:09 PM, Israel Brewster wrote:
On Oct 4, 2021, at 12:46 PM, Ron <ronljohnsonjr@gmail.com> wrote:

On 10/4/21 12:36 PM, Israel Brewster wrote:
[snip]
Indeed. Table per station as opposed to partitioning? The *most* I can reasonably envision needing is to query two stations, i.e. I could see potentially wanting to compare station a to some “baseline” station b. In general, though, the stations are independent, and it seems unlikely that we will need any multi-station queries. Perhaps query one station, then a second query for a second to display graphs for both side-by-side to look for correlations or something, but nothing like that has been suggested at the moment.


Postgresql partitions are tables.  What if you partition by station (or range of stations)?

Yeah, that’s what I thought, but Rob had said “Table per station”, so I wasn’t sure if he was referring to *not* using partitioning, but just making “plain” tables.

Regardless, I intend to try portioning by station sometime this week, to see how performance compares to the “one big table” I currently have. Also to figure out how to get it set up, which from what I’ve seen appears to be a bit of a pain point.
---

My "strict" table per station suggestion was meant as an option to avoid the partitioning pain point entirely if it wasn't going to buy you anything. Namely querying more than one station's data.

In a write-once scenario such as this,  would a "clustered index" on datetime be stable, performant?  Seems a read-for-export could put the head down at time point A and just go?


--------------D39CB16B5071792B2C49186C--