Re: Search from newer tuples first, vs older tuples first? - Mailing list pgsql-hackers

From Lincoln Yeoh
Subject Re: Search from newer tuples first, vs older tuples first?
Date
Msg-id 5.1.0.14.1.20020502154120.035f25c0@192.228.128.13
Whole thread Raw
In response to Re: Search from newer tuples first, vs older tuples first?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Search from newer tuples first, vs older tuples first?
List pgsql-hackers
At 12:49 AM 5/2/02 -0400, Tom Lane wrote:
>Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> > But does Postgresql visit the older tuples first moving to the newer ones,
> > or the newer ones first?
>
>It's going to visit them *all*.  Reordering won't improve the
>performance.

Ack! I thought it went through them till the first valid tuple and was just 
going the wrong way.

>FWIW I think that with the present implementation of btree, the newer
>tuples actually will be visited first --- when inserting a duplicate
>key, the new entry will be inserted to the left of the equal key(s)
>already present.  But it doesn't matter.  The only way to speed this
>up is to eliminate some of the visitings, which requires keeping more
>info in the index than we presently do.

OK I'm starting to get it :). Will the index behaviour be changed soon?

Hmm, then what are the row tuple forward links for? Why forward?

Regards,
Link.



pgsql-hackers by date:

Previous
From: Lincoln Yeoh
Date:
Subject: Re: a vulnerability in PostgreSQL
Next
From: Tatsuo Ishii
Date:
Subject: Re: a vulnerability in PostgreSQL