Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert entries in messagebox to a comma-delimited list
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00298547
Message ID:
00301311
Vues:
35
Bruce,

>>>Anyway, INLIST() is optimizable, perhaps IN is not, at least not the way it's used here for a list of items.
>>
>> It contradicts with Ed Rauh said in his message, so I checked and found, that INLIST works faster. BTW, I know, that $ is not optimizable function. What about AT()? If they are both non-optimizable, I'd rather change my code to use $ instead of AT(), as I do now, for shortness of sql string.
>
>I didn't read what Ed said, but INLIST was not optimizable until later versions of foxpro, I believe. IN also shows fully optimizable in SQL in a list usage ("value set") with SYS(3054). So it's *supposed* to be fast - but I've never done testing with it, so can't say much else...
>
>Not sure about AT() vs $ - neither are optimizable, and I can only say that I have used $ in some fairly large tables, and it's surprisingly fast. You are welcome to test them and give us back the results :)

I made tests today, I selected from lots of joined tables, which are very huge, and issue expression in where clause like:
('A' $ Amenities or 'B'$ Amenities etc.) - it took 164 sec.
(at('A',Amenities)>0 or at('B',Amenities)>0 etc.) - it took 202 sec. I haven't index on Amenities.
So, my conclusion is that $ works faster than at() (at least, if I haven't index). I'm going to change my code appropriately.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform