pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
do temporary tables have hint bits?
2+ messages / 2 participants
[nested] [flat]

* do temporary tables have hint bits?
@ 2010-11-13 13:53  Jon Nelson <jnelson+pgsql@jamponi.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Jon Nelson @ 2010-11-13 13:53 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: do temporary tables have hint bits?
@ 2010-11-13 14:57  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Jon Nelson <jnelson+pgsql@jamponi.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2010-11-13 14:57 UTC (permalink / raw)
  To: Jon Nelson <jnelson+pgsql@jamponi.net>; +Cc: pgsql-performance

Yes.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-11-13 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-13 13:53 do temporary tables have hint bits? Jon Nelson <jnelson+pgsql@jamponi.net>
2010-11-13 14:57 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox