public inbox for [email protected]
help / color / mirror / Atom feedFrom: David Rowley <[email protected]>
To: Bo Guo <[email protected]>
Cc: [email protected]
Subject: Re: Small table selection extremely slow!
Date: Tue, 14 May 2024 23:16:05 +1200
Message-ID: <CAApHDvriMd3RpH9khEV_p+tgqOexRvS7HT1isfdv1OjMA0wSBw@mail.gmail.com> (raw)
In-Reply-To: <CADHFRcjzJoRiPoJ_5Rf9ynetBPt0R5c4L_N_k-uja=W1+izvVg@mail.gmail.com>
References: <CADHFRcjzJoRiPoJ_5Rf9ynetBPt0R5c4L_N_k-uja=W1+izvVg@mail.gmail.com>
On Tue, 14 May 2024 at 23:12, Bo Guo <[email protected]> wrote:
> The following query took 20 seconds on a small table of 108 rows with a dozen columns:
>
> SELECT * FROM azgiv.layers;
>
> EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM azgiv.layers;
> Seq Scan on layers (cost=0.00..14.00 rows=200 width=233) (actual time=0.010..0.087 rows=200 loops=1)
> Buffers: shared hit=12
> Planning:
> Buffers: shared hit=51
> Planning Time: 0.233 ms
> Execution Time: 0.121 ms
One difference between the SELECT and EXPLAIN ANALYZE is that SELECT
will detoast your toasted datums whereas EXPLAIN ANALYZE will not.
It's likely the slowness comes from the detoasting.
David
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Small table selection extremely slow!
In-Reply-To: <CAApHDvriMd3RpH9khEV_p+tgqOexRvS7HT1isfdv1OjMA0wSBw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox