Re: [HACKERS] Fwd: Joins and links - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [HACKERS] Fwd: Joins and links
Date
Msg-id 37828EB2.7DF44EAF@trust.ee
Whole thread Raw
In response to Re: [HACKERS] Fwd: Joins and links  (Vadim Mikheev <vadim@krs.ru>)
List pgsql-hackers
Leon wrote:
> 
> Hello Vadim,
> 
> Tuesday, July 06, 1999 you wrote:
> 
> >> These joins
> >> will never be too slow for an unknown reason. Think carefully.
> >> I hope you will make wise decision.
> 
> V> Optimizer requires major rewrite in any case, even
> V> having links implemented.
> 
> I am afraid that optimizer, even totally rewritten, can't choose
> the best method always. That is simply because it is such a
> complex animal :)  Bacterium - simple links will always win
> in the field where they live :)

>From what I have read from earlier posts about the optimizer, 
there can be situations where using links would actually be slower
than going through the optimiser, similar to the case where scanning 
the whole table using an index can be orders of magnitude slower than 
doing a direct scan.

That is of course if used unwisely ;)

Another thing that has remained unclear to me is the way to actually 
insert or update the links - you can't just put another record there,
so that should be some kind of field (tid,oid,...) or some function
like last_touched('other_table_name').

So, what have you thought to put there ?

------
Hannu


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Fwd: Joins and links
Next
From: Thomas Lockhart
Date:
Subject: Re: A couple comments about datetime