> > You'll probably want to do those at a C level, bypassing the executor. I
> > would guess that executor overhead will completely swamp the effect of
> the
> > cache in most cases.
>
> That seems like it's kind of missing the point. If the tupleDesc
> cache saves so little that it's irrelevant w
On Sat, Feb 18, 2017 at 12:33 AM, Jim Nasby wrote:
> On 2/15/17 1:37 PM, Ryan Murphy wrote:
>> attcacheoff can only be set positive for fields preceding any varlena
>> (typlen<0, but including the first such) or nullable values. I don't
>> know how much faster it is with the cache; yo
On 2/15/17 1:37 PM, Ryan Murphy wrote:
attcacheoff can only be set positive for fields preceding any varlena
(typlen<0, but including the first such) or nullable values. I don't
know how much faster it is with the cache; you can measure it if your
curiosity is strong enough -- j
> attcacheoff can only be set positive for fields preceding any varlena
> (typlen<0, but including the first such) or nullable values. I don't
> know how much faster it is with the cache; you can measure it if your
> curiosity is strong enough -- just set the first column to nullable.
>
>
Thanks!
Ryan Murphy wrote:
> My question kind of remains though - does that mean that having any nulls
> in the tuple loses the ability to use the tupleDesc cache? and how much of
> a performance impact is this? I'm sure there's a good reason why you can't
> really use the cache if you have a null column
> No, that tests whether the particular tuple contains any null fields, not
> whether the whole table is declared NOT NULL.
>
> regards, tom lane
>
Ok, thanks, that makes sense.
My question kind of remains though - does that mean that having any nulls
in the tuple loses th
Ryan Murphy writes:
> My question is this: HeapTupleNoNulls() is run first to see if there are
> any columns that can be NULL. It looks like the fetchatt() that uses the
> cache in the tupleDesc can only be used if there are no NULLable columns in
> the table. Is my understanding correct?
No,
Hi all,
I was looking through some of the implementation details of the
heap/tuples, specifically src/include/access/htup_details.h - and I came
across the big macro fastgetattr, and had a question about it. I've
included the code here for clarity and convenience:
#define fastgetattr(tup, at