Re: attdisbursion

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: attdisbursion
Дата
Msg-id 199909170149.VAA21525@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: [HACKERS] Re: attdisbursion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Added to TODO.  This will improve VACUUM ANALYZE performance, thought I
don't think we have btree comparison functions for all data types,
though we should:

* change VACUUM ANALYZE to use btree comparison functions, not <,=,> calls

> > > Also, I have idea about using '<' '>' in vacuum:
> > > what if try to use btree BT_ORDER functions which allow
> > > to compare vals for many data types (btXXXcmp functions in
> > > nbtcompare.c).
> > 
> > I see, use a btree index to tell use how selective the > or < is?  An
> > interesting idea.  Isn't there a significant performance problem with
> > this?
> 
> Don't use btree index, but use btree functions to compare
> two values of a datatype. You call
>     func_operator = oper("<",...
>                              "="
>                              ">"
> but this's not right way in common case: operators may be 
> overloaded. 
> 
> These functions are stored in catalog.
> To get function for a datatype btree call
> 
> proc = index_getprocid(rel, 1, BTORDER_PROC);
> 
> Look @ nbtcompare.c:
> 
>  *      These functions are stored in pg_amproc.  For each operator class
>  *      defined on btrees, they compute
>  *
>  *              compare(a, b):
>  *                      < 0 if a < b,
>  *                      = 0 if a == b,
>  *                      > 0 if a > b.
> 
> There are functions for INTs, FLOATs, ...
> 
> ...But this is not so important thing...
> 
> Vadim
> 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@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
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgaccess seems a tad confused
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] pgaccess seems a tad confused