Best way to know frequency of column reference? - Mailing list pgsql-hackers

From Kohei KaiGai
Subject Best way to know frequency of column reference?
Date
Msg-id CADyhKSVxx4=xKodEEEtcvrixxS97EPzqDPjzRdrWHDs2OLg2KA@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hello,

As people may know, I've implemented a relation cache mechanism on top of
custom-plan interface, that holds contents of a particular columns only, thus
it does not need to take storage access as long as user's query refers the
columns on in-memory cache.
The key factor of how this mechanism works is selection of columns to be
cached on the initial read, or re-read, of the related heap.
The simplest idea is just picking up referenced columns in the query on demand,
and will reconstruct later if further query referenced more wider reference than
previous one, however, it is not a good strategy.
So, I'd like to investigate the way to select columns to be cached adaptively.
Probably, one better idea is columns-selection according to the frequency of
column references in a particular time-slot.
Right now, pg_statistic does not record such kind of information, if I can
understand correctly. Is there any way to retrieve how many times columns
were referenced? Or, do I need to implement an own extension to track it?

Thanks,
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [RFC] What should we do for reliable WAL archiving?
Next
From: Tom Lane
Date:
Subject: Re: equalTupleDescs() ignores ccvalid/ccnoinherit