From: | Phil Endecott <spam_from_postgresql_general(at)chezphil(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Temporary tables and disk activity |
Date: | 2004-12-09 22:10:21 |
Message-ID: | 41B8CD4D.7010502@chezphil.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Dear All,
I sent a message last weekend asking about temporary tables being
written to disk but didn't get any replies. I'm sure there is someone
out there who knows something about this - please help! Here is the
question again:
Looking at vmstat output on my database server I have been suprised to
see lots of disk writes going on while it is doing what should be
exclusively read-only transactions. I see almost no disk reads as the
database concerned is small enough to fit into the OS disk cache.
I suspect that it might be something to do with temporary tables. There
are a couple of places where I create temporary tables to "optimise"
queries by factoring out what would otherwise be duplicate work. The
amount of data being written is of the right order of magnitude for this
to be the cause. I fear that perhaps Postgresql is flushing these tables
to disk, even though they will be dropped before the end of the
transaction. Is this a possibility? What issues should I be aware of
with temporary tables? Are there any other common causes of lots of disk
writes within read-only transactions? Is there any debug output that I
can look at to track this down?
Thanks in advance for any help that you can offer.
Regards,
Phil Endecott.
From | Date | Subject | |
---|---|---|---|
Next Message | Ioannis Theoharis | 2004-12-10 03:15:42 | Clustering in the presence of hierarchies |
Previous Message | Larry White | 2004-12-09 20:21:53 | using inheritance in production application. |