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 1q6A7H-0008Lx-7K for pgsql-novice@arkaria.postgresql.org; Mon, 05 Jun 2023 13:19:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q6A7G-0002ox-2Y for pgsql-novice@arkaria.postgresql.org; Mon, 05 Jun 2023 13:19:22 +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 1q6A7F-0002oT-Hc for pgsql-novice@lists.postgresql.org; Mon, 05 Jun 2023 13:19:21 +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 1q6A78-000LaQ-Ca for pgsql-novice@lists.postgresql.org; Mon, 05 Jun 2023 13:19:20 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1685971150; cv=none; d=zohomail.eu; s=zohoarc; b=WEkO+FiKN5YG/44QXaR5xldOSYlSJpVyraJX9sYVB0Ohpztpnh+uQtODKtNNqZeqPi33PQkLeQxzKQV5hdPyIkTuWDYS1byoNYlsgh32JJuIIM3ocMW6NQgrwGdqugZVdxEhv3CrrPrAv1OT2ZWefGjXdJ5RMn/DXL0m6DkT8mY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1685971150; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=pPpOVlWNKbFIcarf0p+GaE0V2bRG37GcWoJg7iLtGaU=; b=b4wCSGSbT5uWs+XwcEBsZHQlpTOY1QuE/+BZpf+5u8XY8DNeWAB+Mprg93SAHoeQQ0BVJPZfGP2iK3Vhx65eVzeBRK8xRttnnvZIy5lzQ5y/0wERiyZt61m00/c37zo2K2ZAnLGRKhnAT32lKCmRRRMiE1D79A4YTNNNDOMuF1k= 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=1685971150; s=zmail; d=trallnag.com; i=tim@trallnag.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=pPpOVlWNKbFIcarf0p+GaE0V2bRG37GcWoJg7iLtGaU=; b=TGdjOVn6HRnwP1jThOHapIiOWfRbyrsXXRmr3AeQd4QdPGoCpNkkk3xSZ3yV9oih 6LxGeYDPwf22Ic4jBLgSRWx0sKEUGmLwnaY/Yklj0U18FNDsL1MEwBajSO8wWxMwzXG o1ZotYnWKxuq6PF5ouhvbwE6bHjQfeX4CI+sjJ7g= Received: from mail.zoho.eu by mx.zoho.eu with SMTP id 1685971148446901.9733463817339; Mon, 5 Jun 2023 15:19:08 +0200 (CEST) Date: Mon, 05 Jun 2023 15:19:08 +0200 From: Tim Schwenke To: "William Alves Da Silva" Cc: "pgsql-novice" Message-ID: <1888bb61e93.f979b3b2688245.53647960697321929@trallnag.com> In-Reply-To: <686C8E94-4B50-40E1-9A5C-6500B47C3622@unochapeco.edu.br> References: <1888b7bb7fa.112313046679561.2788161417267896332@trallnag.com> <686C8E94-4B50-40E1-9A5C-6500B47C3622@unochapeco.edu.br> Subject: Re: Does PostgreSQL cache all columns of a table after SELECT? MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 (second try, forgot to put mailing list in Cc) Hello William, here is the query plan. Note that it does not exactly match my example befo= re. In this case the large columns are called fp_smiles_rdkit and smiles_rd= kit for example. I am wondering if smiles_rdkit is also cached even if this= column is not mentioned in the query statement: select id, arthor.similar(fp_smiles_rdkit, "masked molecule") as score from= table order by score desc limit 1000; Probably not because the other columns except fp_smiles_rdkit are not menti= oned anywhere? Limit=C2=A0 (cost=3D9066733.30..9066856.96 rows=3D1000 width=3D14) (actual = time=3D2693.416..2705.022 rows=3D1000 loops=3D1) =C2=A0=C2=A0 Output: moleculeid, (arthor."similar"(fp_smiles_rdkit, 'MASKED= '::text)) =C2=A0=C2=A0 Buffers: shared hit=3D22555 read=3D8871264 =C2=A0=C2=A0 ->=C2=A0 Gather Merge=C2=A0 (cost=3D9066733.30..10548560.34 ro= ws=3D11982869 width=3D14) (actual time=3D2632.949..2644.494 rows=3D1000 loo= ps=3D1) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Output: moleculeid, (artho= r."similar"(fp_smiles_rdkit, 'MASKED'::text)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Workers Planned: 8 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Workers Launched: 8 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D2255= 5 read=3D8871264 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ->=C2=A0 Sort=C2=A0 (cost= =3D9065733.15..9069477.80 rows=3D1497859 width=3D14) (actual time=3D2616.62= 2..2616.663 rows=3D902 loops=3D9) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Output: moleculeid, (arthor."similar"(fp_smiles_rdkit, 'MASKED'::= text)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Sort Key: (arthor."similar"(m.fp_smiles_rdkit, 'MASKED'::text)) D= ESC =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 129kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Buffers: shared hit=3D22555 read=3D8871264 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 0:=C2=A0 actual time=3D2611.366..2611.438 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 128kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.427 ms, Inlining 64.= 124 ms, Optimization 61.353 ms, Emission 37.144 ms, Total 163.048 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D1719 read=3D710940 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 1:=C2=A0 actual time=3D2615.620..2615.658 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 127kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.270 ms, Inlining 37.= 866 ms, Optimization 36.915 ms, Emission 22.436 ms, Total 97.488 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D2653 read=3D1045217 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 2:=C2=A0 actual time=3D2615.612..2615.651 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 125kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.274 ms, Inlining 37.= 858 ms, Optimization 36.761 ms, Emission 22.590 ms, Total 97.484 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D2487 read=3D1059144 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 3:=C2=A0 actual time=3D2612.136..2612.204 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 125kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.410 ms, Inlining 64.= 523 ms, Optimization 61.715 ms, Emission 37.138 ms, Total 163.786 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D1813 read=3D712819 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 4:=C2=A0 actual time=3D2615.616..2615.654 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 129kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.271 ms, Inlining 38.= 924 ms, Optimization 36.381 ms, Emission 22.442 ms, Total 98.018 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D2479 read=3D1066168 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 5:=C2=A0 actual time=3D2615.614..2615.651 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 125kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.271 ms, Inlining 37.= 860 ms, Optimization 36.771 ms, Emission 22.582 ms, Total 97.484 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D2538 read=3D1049422 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 6:=C2=A0 actual time=3D2615.610..2615.647 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 125kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.271 ms, Inlining 37.= 864 ms, Optimization 36.677 ms, Emission 22.675 ms, Total 97.487 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D2465 read=3D1068788 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 Worker 7:=C2=A0 actual time=3D2615.607..2615.644 rows=3D1000 loop= s=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Sort Method: top-N heapsort=C2=A0 Memory: 128kB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 JIT: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Functions: 2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options: Inlining true, Optimization true= , Expressions true, Deforming true =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Timing: Generation 0.271 ms, Inlining 37.= 864 ms, Optimization 36.749 ms, Emission 22.597 ms, Total 97.481 ms =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D3771 read=3D1045888 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ->=C2=A0 Parallel Seq Scan on eval.molecule m=C2=A0 (cost=3D0.00.= .8912094.23 rows=3D1497859 width=3D14) (actual time=3D101.301..2443.105 row= s=3D1331595 loops=3D9) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Output: moleculeid, arthor."s= imilar"(fp_smiles_rdkit, 'MASKED'::text) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared hit=3D22107 r= ead=3D8871264 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 0:=C2=A0 actual time= =3D162.863..2409.947 rows=3D862751 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D1663 read=3D710940 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 1:=C2=A0 actual time= =3D97.449..2454.168 rows=3D1440465 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D2597 read=3D1045217 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 2:=C2=A0 actual time= =3D97.442..2453.629 rows=3D1434116 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D2431 read=3D1059144 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 3:=C2=A0 actual time= =3D163.622..2408.849 rows=3D871340 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D1757 read=3D712819 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 4:=C2=A0 actual time= =3D97.964..2452.247 rows=3D1428958 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D2423 read=3D1066168 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 5:=C2=A0 actual time= =3D97.444..2453.461 rows=3D1427206 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D2482 read=3D1049422 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 6:=C2=A0 actual time= =3D97.443..2453.294 rows=3D1448356 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D2409 read=3D1068788 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Worker 7:=C2=A0 actual time= =3D97.439..2453.456 rows=3D1436563 loops=3D1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Buffers: shared h= it=3D3715 read=3D1045888 Planning Time: 0.061 ms JIT: =C2=A0=C2=A0 Functions: 19 =C2=A0=C2=A0 Options: Inlining true, Optimization true, Expressions true, D= eforming true =C2=A0=C2=A0 Timing: Generation 2.868 ms, Inlining 358.141 ms, Optimization= 380.158 ms, Emission 231.978 ms, Total 973.146 ms Execution Time: 2705.518 ms (94 rows) Tim S. ---- On Mon, 05 Jun 2023 14:19:53 +0200 William Alves Da Silva wrote --- > Hello Tim,=20 > =20 > Can you send the EXPLAIN (BUFFERS, ANALYZE, VERBOSE) of your query? This= will show you whether the plan is using caching or not.=20 > =20 > =20 > > On 5 Jun 2023, at 09:15, Tim Schwenke tim@trallnag.com> wrote:=20 > >=20 > > Hello,=20 > >=20 > > I have the following table with the following columns:=20 > >=20 > > large_a: text (few dozen characters up to a few hundred)=20 > > large_b: text (few dozen characters up to a few hundred)=20 > >=20 > > The table has several million rows. The DB is running on a large machi= ne.=20 > >=20 > > I perform the following query:=20 > >=20 > > select large_a from table;=20 > >=20 > > The first query takes a few minutes. Afterwards I see that the cache i= n memory has grown. Next query only takes a few seconds.=20 > >=20 > > What I want to know:=20 > >=20 > > Does the cache also contain large_b? Or is only large_a cached? Assump= tion is that memory is large enough to fit everything.=20 > >=20 > >=20 > >=20 > =20 > Regards,=20 > William Alves=20 > =20 >=20