Re: SUBSTRING performance for large BYTEA

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Vance Maverick" <vmaverick(at)pgp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SUBSTRING performance for large BYTEA
Date: 2007-08-18 16:20:42
Message-ID: 12895.1187454042@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Vance Maverick" <vmaverick(at)pgp(dot)com> writes:
> My question is about performance in the postgres server. When I execute
> "SELECT SUBSTRING (my_bytea FROM ? FOR ?) FROM my_table WHERE id =3D ?",
> does it fetch the whole BYTEA into memory? Or does it access only the
> pages that contain the requested substring?

Recent releases will do what you want if the column has been marked
SET STORAGE EXTERNAL (before storing anything in it...) See the
ALTER TABLE reference page.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2007-08-18 16:29:23 Re: Writing most code in Stored Procedures
Previous Message Joshua D. Drake 2007-08-18 16:08:37 Re: Writing most code in Stored Procedures