Re: Which index is fastest
Posted in 1999
Topics: General Discussion
Sorry, I don't remember your last example, but, Art said that more unique column should be first in the index, and I think zip is it. Best Regards, Octav On Tue, Mar 09, 1999 at 09:01:26AM +0000, Manel Falc' wrote: > So, according to Art's, the best index from my latest example would > be (gender, zip) instead of (zip, gender), wouldn't it ? > > > On Mon, 08 Mar 1999 13:50:26 -0500, "Art S. Kagel" > <kagel@bloomberg.net> wrote: > > >Demetrios Stavrinos wrote: > >> > >> For whatever is worth! > >> We use composite indices extensively. The best results are achieved with > >> whatever combination makes the COMPOSITE index more unique! > >[SNIP] > >Correct but the original post listed the same columns for each index > >just in different order. The uniqueness of the indexes will be > >identical with the same number of nodes. HOWEVER, the index that > >begins with the more unique column will have fewer levels and therefore > >be slightly more efficient. > > > >Art S. Kagel > > > Thanks a lot, > > Manel Falc' > SEMIC, S.A. > Lleida-Catalonia-Spain-Europe > ----------------------------------------------------- > Informix version: Informix SE 5.07 / RDS 4.x & 4J's > Operating system: Unix SCO V 5.04 > ----------------------------------------------------- -- Octav Chiriac Phone: (373) 2 21 20 96 NetInfo S.R.L. Fax: (373) 2 21 36 59 Chisinau (373) 2 24 00 83 Moldova, Republic of mailto:com@netinfo-moldova.com
Octav Chiriac wrote: > > Sorry, I don't remember your last example, but, > Art said that more unique column should be first in the index, and > I think zip is it. Correct. Gender has fewer possible values (2 last time I looked) which has little filter value. Art S. Kagel
art, > Correct. Gender has fewer possible values (2 last time I looked) which > has little filter value. well, that isn't quite the case. we worked on a system at a hospital a while back where there were *9*, read it 9, genders: 1) female 2) male 3) male becoming female 4) female becoming male 5) male become female 6) female become male and i can't remember the rest. that makes for a little better filtering;-) mickm -- ----------------------------------------------------------------------- This is a signature file. This is only a signature file. Had this been an actual piece of useful information, you would have been instructed on what to do with it. -----------------------------------------------------------------------