> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Conclusions:
> > o drop/recreate index is slower than vacuum of indexes
>
> BTW, I did some profiling of CREATE INDEX this evening (quite
> unintentionally actually; I was interested in COPY IN, but the pg_dump
> script I used as driver happened to create some indexes too). I was
> startled to discover that 60% of the runtime of CREATE INDEX is spent in
> _bt_invokestrat (which is called from tuplesort.c's comparetup_index,
> and exists only to figure out which specific comparison routine to call).
> Of this, a whopping 4% was spent in the useful subroutine, int4gt. All
> the rest went into lookup and validation checks that by rights should be
> done once per index creation, not once per comparison.
Good job, Tom. Clearly a huge win.
-- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026