Re: attdisbursion

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: attdisbursion
Date: 1999-09-17 01:49:31
Message-ID: 199909170149.VAA21525@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-17 01:53:52 pgaccess seems a tad confused
Previous Message Hiroshi Inoue 1999-09-17 01:40:48 couldn't rollback cache ?