Re: Small table selection extremely slow!

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Small table selection extremely slow!
Дата
Msg-id CAApHDvriMd3RpH9khEV_p+tgqOexRvS7HT1isfdv1OjMA0wSBw@mail.gmail.com
обсуждение исходный текст
Ответ на Small table selection extremely slow!  (Bo Guo <bo.guo@gisticinc.com>)
Список pgsql-sql
On Tue, 14 May 2024 at 23:12, Bo Guo <bo.guo@gisticinc.com> 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Bo Guo
Дата:
Сообщение: Small table selection extremely slow!
Следующее
От: MichaelDBA
Дата:
Сообщение: Re: Small table selection extremely slow!