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

Re: [PERFORM] Terrible performance on wide selects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Dann Corbit <DCorbit(at)connx(dot)com>,Steve Crawford <scrawford(at)pinpointresearch(dot)com>,pgsql-performance(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [PERFORM] Terrible performance on wide selects
Date: 2003-01-23 14:46:50
Message-ID: 25701.1043333210@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
Hannu Krosing <hannu(at)tm(dot)ee> writes:
> as  tuple (int,int,int,varchar,varchar)
> which is currently stored as
> (intdata1, intdata2, intdata3, (len4, vardata4), (len5,vardata5))
> should be rewritten on storage to
> (ptr4,ptr5),(intdata1, intdata2, intdata3, vardata4,vardata5)

I do not see that this buys anything at all.  heap_getattr still has to
make essentially the same calculation as before to determine column
locations, namely adding up column widths.  All you've done is move the
data that it has to fetch to make the calculation.  If anything, this
will be slower not faster, because now heap_getattr has to keep track
of two positions not one --- not just the next column offset, but also
the index of the next "ptr" to use.  In the existing method it only
needs the column offset, because that's exactly where it can pick up
the next length from.

But the really serious objection is that the datatype functions that
access the data would now also need to be passed two pointers, since
after all they would like to know the length too.  That breaks APIs
far and wide :-(

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2003-01-23 14:50:02
Subject: Re: Terrible performance on wide selects
Previous:From: Tom LaneDate: 2003-01-23 14:41:25
Subject: Re: Terrible performance on wide selects

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-01-23 14:50:02
Subject: Re: Terrible performance on wide selects
Previous:From: Tom LaneDate: 2003-01-23 14:41:25
Subject: Re: Terrible performance on wide selects

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