Re: SUBSTRING performance for large BYTEA - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: SUBSTRING performance for large BYTEA
Date
Msg-id 46C71F02.5090307@commandprompt.com
Whole thread Raw
In response to Re: SUBSTRING performance for large BYTEA  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SUBSTRING performance for large BYTEA  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Lane wrote:
> "Vance Maverick" <vmaverick@pgp.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.

Should we consider setting storage external by default for the type?

Joshua D. Drake

>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>


- --

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997  http://www.commandprompt.com/
            UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGxx8CATb/zqfZUUQRAkXkAJ4i6GKe7/v8dHOaj8fjTvc2hZZN4wCgknFQ
VVaj655AAbKFipfFNcAbdos=
=jdgD
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Writing most code in Stored Procedures
Next
From: Raymond O'Donnell
Date:
Subject: Re: Finding my database