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

do temporary tables have hint bits?

From: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: do temporary tables have hint bits?
Date: 2010-11-13 13:53:27
Message-ID: AANLkTinDoe6sNb6X+WT0vG+pC5BEGpaCE649xT2CK0hq@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
I was doing some testing with temporary tables using this sql:

begin;
select pg_sleep(30);
create temporary TABLE foo (a int, b int, c int, d text);
insert into foo SELECT (x%1000) AS a,(x%1001) AS b, (x % 650) as c, ''
as d  FROM generate_series( 1, 1000000 ) AS x;
-- create temporary TABLE foo AS SELECT (x%1000) AS a,(x%1001) AS b,
(x % 650) as c, '' as d  FROM generate_series( 1, 1000000 ) AS x;
select count(1) from foo;


While it was in pg_sleep, I would attach to the backend process with strace.
I observed a few things that I don't yet understand, but one thing I
did notice was an I/O pattern (following the count(1)) that seemed to
suggest that the table was getting its hint bits set. I thought hint
bits were just for the mvcc side of things?  If this is a temporary
table, is there any need or benefit to setting hint bits?

-- 
Jon

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2010-11-13 14:57:29
Subject: Re: do temporary tables have hint bits?
Previous:From: Marc MaminDate: 2010-11-13 09:32:12
Subject: Re: anti-join chosen even when slower than old plan

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