Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toasted text #15

Open
Krysztophe opened this issue May 4, 2020 · 1 comment
Open

Toasted text #15

Krysztophe opened this issue May 4, 2020 · 1 comment

Comments

@Krysztophe
Copy link

As discussed today on daliconsultants:

In pg_stats, toasted data is exactly 18 bytes when data is totally toasted. So the query computes that the bloat is higher than real.

Perhaps is it possible to exclude text columns with 18.0 bytes and an extended/external storage ? That would not solve the case for columns with very different sizes, where avg_width is a mix of 18 and real sizes.

@ioguix
Copy link
Owner

ioguix commented Aug 17, 2020

Hi,

for now, I added some explanation in the README.

Perhaps is it possible to exclude text columns with 18.0 bytes and an extended/external storage ?

Any idea and PoC is appreciated. However, it is not possible to know exactly what field in what row has been toasted away...
Moreover, excluding a field from a table is not enough as we would not be able to compute the expected size of the table anyway. We would have to exclude the whole table using eg. is_na.
Lastly, what if 50% of a field has been toasted? or even 99% ? The average size will not be 18, but the computed expected size will still be far off...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants