Skip site navigation (1) Skip section navigation (2)

Re: TOAST usage setting

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: 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 17:00:57
Message-ID: 200705291700.l4TH0vf05481@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Gregory Stark wrote:
> "Bruce Momjian" <bruce(at)momjian(dot)us> writes:
> 
> > Gregory Stark wrote:
> >
> >> 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).
> 
> No, we did substring() too :)

Uh, I looked at text_substring(), and while there is an optimization to
do character counting for encoding length == 1, it is still accessing
the data.

-- 
  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. +

In response to

Responses

pgsql-hackers by date

Next:From: Gregory StarkDate: 2007-05-29 17:02:51
Subject: Re: Concurrent psql patch
Previous:From: Gregory StarkDate: 2007-05-29 16:41:09
Subject: Re: Concurrent psql patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group