pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Insert only tables and vacuum performance
7+ messages / 3 participants
[nested] [flat]

* Insert only tables and vacuum performance
@ 2004-04-29 23:08 Joseph Shraibman <jks@selectacast.net>
  2004-04-29 23:24 ` Re: Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  2004-04-30 04:30 ` Re: Insert only tables and vacuum performance Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 7+ messages in thread

From: Joseph Shraibman @ 2004-04-29 23:08 UTC (permalink / raw)
  To: pgsql-performance

I have a table that is never updated, only INSERTED into. Is there a way 
I can prevent vacuum wasting time on this table besides vacuuming each 
table in the db by itself and omitting this table?

How feasable would it be to have a marker somewhere in pg that is 
"updated since last vacuum" that would be cleared when vacuum runs, and 
if set vacuum will ignore that table?



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

* Re: Insert only tables and vacuum performance
  2004-04-29 23:08 Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
@ 2004-04-29 23:24 ` Joseph Shraibman <jks@selectacast.net>
  2004-04-30 00:44   ` Re: Insert only tables and vacuum performance Rod Taylor <pg@rbt.ca>
  1 sibling, 1 reply; 7+ messages in thread

From: Joseph Shraibman @ 2004-04-29 23:24 UTC (permalink / raw)
  To: pgsql-performance

Joseph Shraibman wrote:
> I have a table that is never updated, only INSERTED into. Is there a way 
> I can prevent vacuum wasting time on this table besides vacuuming each 
> table in the db by itself and omitting this table?
> 
> How feasable would it be to have a marker somewhere in pg that is 
> "updated since last vacuum" that would be cleared when vacuum runs, and 
> if set vacuum will ignore that table?

Or even better an offset into the datatable for the earliest deleted 
row, so if you have a table where you update the row shortly after 
insert and then never touch it vacuum can skip most of the table 
(inserts are done at the end of the table, right?)



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

* Re: Insert only tables and vacuum performance
  2004-04-29 23:08 Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  2004-04-29 23:24 ` Re: Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
@ 2004-04-30 00:44   ` Rod Taylor <pg@rbt.ca>
  2004-04-30 00:53     ` Re: Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  0 siblings, 1 reply; 7+ messages in thread

From: Rod Taylor @ 2004-04-30 00:44 UTC (permalink / raw)
  To: Joseph Shraibman <jks@selectacast.net>; +Cc: pgsql-performance

> Or even better an offset into the datatable for the earliest deleted 
> row, so if you have a table where you update the row shortly after 
> insert and then never touch it vacuum can skip most of the table 
> (inserts are done at the end of the table, right?)

Inserts are done at the end of the table as a last resort. But anyway,
how do you handle a rolled back insert?





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

* Re: Insert only tables and vacuum performance
  2004-04-29 23:08 Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  2004-04-29 23:24 ` Re: Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  2004-04-30 00:44   ` Re: Insert only tables and vacuum performance Rod Taylor <pg@rbt.ca>
@ 2004-04-30 00:53     ` Joseph Shraibman <jks@selectacast.net>
  0 siblings, 0 replies; 7+ messages in thread

From: Joseph Shraibman @ 2004-04-30 00:53 UTC (permalink / raw)
  To: Rod Taylor <pg@rbt.ca>; +Cc: pgsql-performance

Rod Taylor wrote:
>>Or even better an offset into the datatable for the earliest deleted 
>>row, so if you have a table where you update the row shortly after 
>>insert and then never touch it vacuum can skip most of the table 
>>(inserts are done at the end of the table, right?)
> 
> 
> Inserts are done at the end of the table as a last resort.

But if most of the table is never updated then the inserts would tend to 
be at the end, right?

> But anyway,
> how do you handle a rolled back insert?
> 
It is considered like a deleted row to be vacuumed.



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

* Re: Insert only tables and vacuum performance
  2004-04-29 23:08 Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
@ 2004-04-30 04:30 ` Tom Lane <tgl@sss.pgh.pa.us>
  2004-04-30 05:57   ` Re: Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  1 sibling, 1 reply; 7+ messages in thread

From: Tom Lane @ 2004-04-30 04:30 UTC (permalink / raw)
  To: Joseph Shraibman <jks@selectacast.net>; +Cc: pgsql-performance

Joseph Shraibman <jks@selectacast.net> writes:
> I have a table that is never updated, only INSERTED into. Is there a way 
> I can prevent vacuum wasting time on this table

What makes you think vacuum is wasting much time on this table?  AFAICS
it will only update any unfixed hint bits ...

			regards, tom lane



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

* Re: Insert only tables and vacuum performance
  2004-04-29 23:08 Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  2004-04-30 04:30 ` Re: Insert only tables and vacuum performance Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-04-30 05:57   ` Joseph Shraibman <jks@selectacast.net>
  2004-05-01 03:04     ` Re: Insert only tables and vacuum performance Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Joseph Shraibman @ 2004-04-30 05:57 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-performance

Tom Lane wrote:
> Joseph Shraibman <jks@selectacast.net> writes:
> 
>>I have a table that is never updated, only INSERTED into. Is there a way 
>>I can prevent vacuum wasting time on this table
> 
> 
> What makes you think vacuum is wasting much time on this table?  AFAICS
> it will only update any unfixed hint bits ...
> 
> 			regards, tom lane

INFO:  "elog": found 0 removable, 12869411 nonremovable row versions in 
196195 pages
DETAIL:  0 dead row versions cannot be removed yet.
There were 5 unused item pointers.
0 pages are entirely empty.
CPU 31.61s/4.53u sec elapsed 1096.83 sec.

It took 1096.83 seconds, and what did it accomplish?  And what are hint 
bits?



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

* Re: Insert only tables and vacuum performance
  2004-04-29 23:08 Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
  2004-04-30 04:30 ` Re: Insert only tables and vacuum performance Tom Lane <tgl@sss.pgh.pa.us>
  2004-04-30 05:57   ` Re: Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
@ 2004-05-01 03:04     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2004-05-01 03:04 UTC (permalink / raw)
  To: Joseph Shraibman <jks@selectacast.net>; +Cc: pgsql-performance

Joseph Shraibman <jks@selectacast.net> writes:
> INFO:  "elog": found 0 removable, 12869411 nonremovable row versions in 
> 196195 pages
> DETAIL:  0 dead row versions cannot be removed yet.
> There were 5 unused item pointers.
> 0 pages are entirely empty.
> CPU 31.61s/4.53u sec elapsed 1096.83 sec.

Hmm.  These numbers suggest that your disk subsystem's bandwidth is
only about 1.4 Mbytes/sec.  Was there a lot else going on?

			regards, tom lane



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


end of thread, other threads:[~2004-05-01 03:04 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29 23:08 Insert only tables and vacuum performance Joseph Shraibman <jks@selectacast.net>
2004-04-29 23:24 ` Joseph Shraibman <jks@selectacast.net>
2004-04-30 00:44   ` Rod Taylor <pg@rbt.ca>
2004-04-30 00:53     ` Joseph Shraibman <jks@selectacast.net>
2004-04-30 04:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-04-30 05:57   ` Joseph Shraibman <jks@selectacast.net>
2004-05-01 03:04     ` 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