Thread: How to know detailed information about HOT(Heap-Only Tuples)?

How to know detailed information about HOT(Heap-Only Tuples)?

From
高健
Date:
Hi:

I have heard that Heap-Only Tuples is introduce from 8.3.
And I  am searching information for it.

How can I get a  detailed information of HOT?
For example:  
according to  a table, How many tuples are heap only tuples , and how many are not?

And also , Is there any options which can influence HOT occurrance?

Best Regards

Re: How to know detailed information about HOT(Heap-Only Tuples)?

From
Luca Ferrari
Date:
On Thu, Aug 22, 2013 at 4:20 AM, 高健 <luckyjackgao@gmail.com> wrote:

> according to  a table, How many tuples are heap only tuples , and how many
> are not?
>

I believe there are not "hot tuples", a tuple is updated using HOT
depending on the indexes defined and the type of update itself.
Anyway, you can get an information of how many tuples have been
hot-touched via pg_stat_user_tables.n_tup_hot_upd


> And also , Is there any options which can influence HOT occurrance?

The storage setting (fillfactor) will change the hotness of your
tables, but of course this depends on the workload.

Luca


Re: How to know detailed information about HOT(Heap-Only Tuples)?

From
Adrian Klaver
Date:
On 08/21/2013 07:20 PM, 高健 wrote:
> Hi:
>
> I have heard that Heap-Only Tuples is introduce from 8.3.
> And I  am searching information for it.
>
> How can I get a  detailed information of HOT?

http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/access/heap/README.HOT;hb=HEAD

> For example:
> according to  a table, How many tuples are heap only tuples , and how
> many are not?
>
> And also , Is there any options which can influence HOT occurrance?
>
> Best Regards


--
Adrian Klaver
adrian.klaver@gmail.com


Re: How to know detailed information about HOT(Heap-Only Tuples)?

From
高健
Date:
Hi:

Thank you  all for kindly replying.

I think that I need this:   pg_stat_user_tables.n_tup_hot_upd 

And  Adrian's information is a pretty good material  for me to understand the internal.


Best regards



2013/8/22 Adrian Klaver <adrian.klaver@gmail.com>
On 08/21/2013 07:20 PM, 高健 wrote:
Hi:

I have heard that Heap-Only Tuples is introduce from 8.3.
And I  am searching information for it.

How can I get a  detailed information of HOT?

http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/access/heap/README.HOT;hb=HEAD


For example:
according to  a table, How many tuples are heap only tuples , and how
many are not?

And also , Is there any options which can influence HOT occurrance?

Best Regards


--
Adrian Klaver
adrian.klaver@gmail.com