From: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
---|---|
To: | Hannu Krosing <hannu(at)tm(dot)ee> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: More tablescanning fun |
Date: | 2003-04-25 16:56:13 |
Message-ID: | 20030425115613.E66185@flake.decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Fri, Apr 25, 2003 at 07:28:06PM +0300, Hannu Krosing wrote:
> I have been pondering if keeping pages half-empty (or even 70% empty)
> could solve both clustering problems and longish updates for much data.
>
> If we could place the copy in the same page than original, most big
> updates would be possible by one sweep of disk heads and also clustering
> order would be easier to keep if pages were kept intentionally half
> empty.
>
> So "VACUUM FULL 65% EMPTY;" could make sense ?
That's actually a recommended practice, at least for sybase when you're
using a clustered index, depending on what you're using it for. If you
cluster a table in such a way that inserts will happen across the entire
table, you'll actually end up with a fillratio (amount of data v. empty
space on a page) of 75% over time, because of page splits. When sybase
goes to insert, if it can't find room on the page it needs to insert
into (keep in mind this is a clustered table, so a given row *must* go
into a given position), it will split that single page into two pages,
each of which will then have a fillratio of 50%. Of course they'll
eventually approach 100%, so the average fill ratio across all pages for
the table would be 75%.
I'm not familiar enough with pgsql's guts to know how big an impact
updates across pages are, or if they even happen often at all. If you're
not maintaining a clustered table, couldn't all updates just occur
in-place? Or are you thinking of the case where you have a lot of
variable-length stuff?
--
Jim C. Nasby (aka Decibel!) jim(at)nasby(dot)net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2003-04-25 19:52:16 | Re: [PERFORM] Foreign key performance |
Previous Message | Hannu Krosing | 2003-04-25 16:28:06 | Re: More tablescanning fun |