| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Victor Adolfsson" <victor(at)optimumbiometrics(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Performance problem with large resultsets (byte array 2200) |
| Date: | 2007-07-31 14:25:45 |
| Message-ID: | 19283.1185891945@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Victor Adolfsson" <victor(at)optimumbiometrics(dot)com> writes:
> I'm having a problem with bad performance when retrieving many rows where
> each row has a 2200 long byte array (called template_compressed) and a 50
> character varying (called uniqueid)
2200 bytes is (just) long enough to trigger toasting of the entries, and
I suppose it's the extra time to fetch a toasted value that's hurting.
As long as the total row width is under 8K, you could disable toasting
by ALTER TABLE ... SET STORAGE PLAIN on all the variable-width columns
of the table. Note that this wouldn't in itself de-toast rows already
stored; so you'd have to dump/truncate/reload the table before seeing
any performance benefit.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nicola Benaglia | 2007-07-31 14:27:17 | huge file in pg_xlog and base |
| Previous Message | Lee Keel | 2007-07-31 14:18:42 | Re: tables not in list |