Re: How can fixed and variable width columns perform similarly?

From: "Siddharth Anand" <sid(at)etsy(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: sid(at)etsy(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: How can fixed and variable width columns perform similarly?
Date: 2007-04-27 16:19:04
Message-ID: 50516.209.51.183.100.1177690744.squirrel@mailbox.etsy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Tom,
My question wasn't phrased clearly. Oracle exhibits a performance
degradation for very large-sized fields (CLOB types that I equate to
PostGres' text type) when compared with the performance of field types
like varchar that handle a max character limit of a few thousand bytes in
Oracle.

It sounds like PostGres doesn't exhibit this same difference. I wanted to
understand how this could be and whether there was a trade-off.

Cheers!
Sid
> "Siddharth Anand" <sid(at)etsy(dot)com> writes:
>> How can a field that doesn't have a limit like "text" perform similarly
>> to
>> char varying(128), for example? At some point, we need to write data to
>> disk. The more data that needs to be written, the longer the disk write
>> will take, especially when it requires finding free sectors to write to.
>
> What's your point? If you're not going to put more than 128 characters
> in the field, there's no difference in the amount of data involved.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2007-04-27 16:25:57 Re: How can fixed and variable width columns perform similarly?
Previous Message Jim Nasby 2007-04-27 16:12:21 Re: Feature Request --- was: PostgreSQL Performance Tuning