AW: AW: AW: Plans for solving the VACUUM problem - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: AW: AW: Plans for solving the VACUUM problem
Date
Msg-id 11C1E6749A55D411A9670001FA6879633682D6@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> There was some discussion of doing that, but it fell down on the little
> problem that in normal index-search cases you *don't* know the heap tid
> you are looking for.

I can not follow here. It does not matter if you don't know a trailing 
part of the key when doing a btree search, it only helps to directly find the 
leaf page.

> 
> > And in above case, the keys (since identical except xtid) will stick close 
> > together, thus caching will be good.
> 
> Even without key-collision problems, deleting N tuples out of a total of
> M index entries will require search costs like this:
> 
> bulk delete in linear scan way:
> 
>     O(M)        I/O costs (read all the pages)
>     O(M log N)    CPU costs (lookup each TID in sorted list)
> 
> successive index probe way:
> 
>     O(N log M)    I/O costs for probing index
>     O(N log M)    CPU costs for probing index (key comparisons)

both    O(N log (levels in index))

> So, as I said to Hiroshi, this alternative looks to me like a possible
> future refinement, not something we need to do in the first version.

Yes, I thought it might be easier to implement than the index scan :-)

Andreas


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] syntax warning on
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: Adding index flag showing tuple status