Explain analyse and toasted data.

Started by Benoit Lobréauover 8 years ago2 messagesgeneral
Jump to latest
#1Benoit Lobréau
benoit.lobreau@gmail.com

Hi,

In this video (PostgreSQL at 10 TB and beyond: https://youtu.be/8mKpfutwD0U
at 6mn05), the speaker says that on very big databases explain analyse can
give unrealistic results because it doesn't read toasted data.

I suppose it's because of this: "The big values of TOASTed attributes will
only be pulled out (if selected at all) at the time the result set is sent
to the client." But I dont know if explain analyse does something to
simulate this (if it's possible).

Could you give me a hand to verify/understand this information please ?

Thanks in advance.

Benoit.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Benoit Lobréau (#1)
Re: Explain analyse and toasted data.

=?UTF-8?Q?Benoit_Lobr=C3=A9au?= <benoit.lobreau@gmail.com> writes:

In this video (PostgreSQL at 10 TB and beyond: https://youtu.be/8mKpfutwD0U
at 6mn05), the speaker says that on very big databases explain analyse can
give unrealistic results because it doesn't read toasted data.

I suppose it's because of this: "The big values of TOASTed attributes will
only be pulled out (if selected at all) at the time the result set is sent
to the client." But I dont know if explain analyse does something to
simulate this (if it's possible).

EXPLAIN ANALYZE does not do that. It likewise does not do anything to try
to model the network transmission costs, which are also likely to be
significant if the data is bulky --- but there's no way to do that without
actually sending the result data to the client, AFAICS.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general