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 1q6Bvk-0004Yj-G9 for pgsql-novice@arkaria.postgresql.org; Mon, 05 Jun 2023 15:15:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q6Bvj-0002PO-1S for pgsql-novice@arkaria.postgresql.org; Mon, 05 Jun 2023 15:15:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6Bvi-0002OH-O2 for pgsql-novice@lists.postgresql.org; Mon, 05 Jun 2023 15:15:34 +0000 Received: from sender11-op-o11.zoho.eu ([31.186.226.225]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q6Bvd-000McO-AH for pgsql-novice@lists.postgresql.org; Mon, 05 Jun 2023 15:15:33 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1685978126; cv=none; d=zohomail.eu; s=zohoarc; b=cqYA/BrP9NlJKBqXIyfbbrHgVg80p62InO0WG6/tNcjc907JyRydRudVtF79KiL+rzaden2BoNj3/KtLZN8i1tJZwguWLEZ5cJKa0Nnl9YqUmeaxUwEu+Z4FpYrFPH2Esv6rGM4nCcRep3Vh6cXsFeh58q5UVWWdnBe2i210uQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1685978126; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=sHBbNw+fZA8AwEVggFcnjGHGjNV+42MiPFmCgpwM8Gg=; b=FMFH39YVfxpDVjSP9SmkhcEdKR0vhz7Q9T0GgmimnAL47CdQzOsHBcJkGpGwedk73HHzLi1JtuemxydGg55y57qOi4M1MorbSxl5MFtucjCVTSR10zMmnsibel2A7ZFW+4j3RQVKyNMJy/4+IEnZrCh9Gqadywo3GhoqW4PF/e0= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=trallnag.com; spf=pass smtp.mailfrom=tim@trallnag.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1685978126; s=zmail; d=trallnag.com; i=tim@trallnag.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-Id:Message-Id:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Reply-To; bh=sHBbNw+fZA8AwEVggFcnjGHGjNV+42MiPFmCgpwM8Gg=; b=QSmUgpDwROwFS18z8rH/HXtYkRFVyshFBfjKfdFMVny+mV0ZRh9z5r2Y6z402I8o wViqtr7aZENbLhKRJ1LRdMfeCCa0SwCP29tzEKMp6MoMm5yvAABCIWPniVOK1eC5keD nWvW7+j/nfCZhMAPIiUnCtjqXGdyXFWgrrancPQI= Received: from mail.zoho.eu by mx.zoho.eu with SMTP id 1685978124924894.1990831800483; Mon, 5 Jun 2023 17:15:24 +0200 (CEST) Date: Mon, 05 Jun 2023 17:15:24 +0200 From: Tim Schwenke To: "David G. Johnston" Cc: "Pgsql Novice" Message-Id: <1888c20926e.d2fc55ae8791.8729366224157085719@trallnag.com> In-Reply-To: References: <1888b7bb7fa.112313046679561.2788161417267896332@trallnag.com> <1888bb46d75.c27dbb7f688001.5044215935079224344@trallnag.com> Subject: Re: Does PostgreSQL cache all columns of a table after SELECT? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27250_482253218.1685978124910" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_27250_482253218.1685978124910 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, you all helped me ---- On Mon, 05 Jun 2023 16:26:08 +0200 David G. Johnston wrote --- On Mon, Jun 5, 2023, 06:17 Tim Schwenke wrote: Hello David, =20 from what I understand, in PostgreSQL, tables are stored in one or more fi= les called segments. There is no separation by columns. =20 https://www.postgresql.org/docs/8.1/storage.html =20 This means if I select a single column from a table the first time, the fu= ll file / segment is read and put into page cache if there is enough space. Pages are subsegment. You may also wish to take care to notice the version of documentation pages= you look at and reference.=C2=A0 8.1 is long past its expiration date. David J. ------=_Part_27250_482253218.1685978124910 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
Thanks, you all helped me

---- On Mon, 05 Jun 2023 16:26:08 +0200 David G. Johnston <david.g.johnston@gmail.com> wrote ---

On Mon, Jun 5, 2023, 06:17 Tim S= chwenke <tim@trall= nag.com> wrote:
Hello David,

from what I understand, in Postg= reSQL, tables are stored in one or more files called segments. There is no = separation by columns.

https://www.postgresql.org/docs/8.1/sto= rage.html

This means if I select a single column from a table = the first time, the full file / segment is read and put into page cache if = there is enough space.

=
Pages are subsegment.

You may also wish to take care to notice the version of= documentation pages you look at and reference.  8.1 is long past its = expiration date.

Dav= id J.

------=_Part_27250_482253218.1685978124910--