From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: TOAST usage setting |
Date: | 2007-05-29 16:11:01 |
Message-ID: | 200705291611.l4TGB1N07298@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera wrote:
> > > >> > Strangely, 128 bytes seems to be the break-even point for TOAST and
> > > >> > non-TOAST, even for sequential scans of the entire heap touching all
> > > >> > long row values. I am somewhat confused why TOAST has faster access
> > > >> > than inline heap data.
> > >
> > > Is your database initialized with C locale? If so then length(text) is
> > > optimized to not have to detoast:
> > >
> > > if (pg_database_encoding_max_length() == 1)
> > > PG_RETURN_INT32(toast_raw_datum_size(str) - VARHDRSZ);
> >
> > Wow, we optimized length(). OK, will run the test with
> > substring(t,1,1).
>
> Be careful about the compression! It might be a good idea to run the
> test once with the column set to uncompressible (SET STORAGE EXTERNAL?),
> and again with it as compressible.
My test uses random data, which I figured was a close to real-world as I
could get, and I have a test that makes sure the data was pushed to the
TOAST table. Should I still try EXTERNAL?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-05-29 16:12:46 | Re: TOAST usage setting |
Previous Message | Alvaro Herrera | 2007-05-29 16:09:16 | Re: TOAST usage setting |