public inbox for [email protected]
help / color / mirror / Atom feedRe: dead tuple difference between pgstattuple and pg_stat_user_tables
2+ messages / 1 participants
[nested] [flat]
* Re: dead tuple difference between pgstattuple and pg_stat_user_tables
@ 2024-08-23 16:51 Adrian Klaver <[email protected]>
2024-08-23 16:53 ` Re: dead tuple difference between pgstattuple and pg_stat_user_tables Adrian Klaver <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Klaver @ 2024-08-23 16:51 UTC (permalink / raw)
To: Matthew Tice <[email protected]>; +Cc: [email protected]
On 8/23/24 09:33, Matthew Tice wrote:
>
>
> On Fri, Aug 23, 2024 at 10:26 AM Adrian Klaver
> <[email protected] <mailto:[email protected]>> wrote:
> https://www.postgresql.org/docs/current/pgstattuple.html
> <https://www.postgresql.org/docs/current/pgstattuple.html;
>
> pgstattuple_approx(regclass) returns record
>
> pgstattuple_approx is a faster alternative to pgstattuple that
> returns approximate results.
>
> Not sure how you get exact count out of that?
>
>
> Maybe the wording is a little confusing to me. Under the section
> for pgstattuple_approx:
> "pgstattuple_approx tries to avoid the full-table scan and returns exact
> dead tuple statistics along with an approximation of the number and size
> of live tuples and free space."
Yeah, see what you mean.
The part that bears more investigating for this case is:
"It does this by skipping pages that have only visible tuples according
to the visibility map (if a page has the corresponding VM bit set, then
it is assumed to contain no dead tuples).
Wondering if PostgreSQl-compatible covers this?
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: dead tuple difference between pgstattuple and pg_stat_user_tables
2024-08-23 16:51 Re: dead tuple difference between pgstattuple and pg_stat_user_tables Adrian Klaver <[email protected]>
@ 2024-08-23 16:53 ` Adrian Klaver <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Klaver @ 2024-08-23 16:53 UTC (permalink / raw)
To: Matthew Tice <[email protected]>; +Cc: [email protected]
On 8/23/24 09:51, Adrian Klaver wrote:
> On 8/23/24 09:33, Matthew Tice wrote:
>>
>>
>> On Fri, Aug 23, 2024 at 10:26 AM Adrian Klaver
>> <[email protected] <mailto:[email protected]>> wrote:
>
>> https://www.postgresql.org/docs/current/pgstattuple.html
>> <https://www.postgresql.org/docs/current/pgstattuple.html;
>>
>> pgstattuple_approx(regclass) returns record
>>
>> pgstattuple_approx is a faster alternative to pgstattuple that
>> returns approximate results.
>>
>> Not sure how you get exact count out of that?
>>
>>
>> Maybe the wording is a little confusing to me. Under the section
>> for pgstattuple_approx:
>> "pgstattuple_approx tries to avoid the full-table scan and returns
>> exact dead tuple statistics along with an approximation of the number
>> and size of live tuples and free space."
>
> Yeah, see what you mean.
>
> The part that bears more investigating for this case is:
>
> "It does this by skipping pages that have only visible tuples according
> to the visibility map (if a page has the corresponding VM bit set, then
> it is assumed to contain no dead tuples).
>
> Wondering if PostgreSQl-compatible covers this?
Meant to add:
What happens if you use pgstattuple instead?
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-08-23 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-23 16:51 Re: dead tuple difference between pgstattuple and pg_stat_user_tables Adrian Klaver <[email protected]>
2024-08-23 16:53 ` Adrian Klaver <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox