Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BinToc() in SQL
Message
 
 
À
09/03/2002 00:56:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00630524
Message ID:
00630702
Vues:
20
Hi!

Filtered indexes does not included in the optimization of queries, so do nto use filters for !Deleted(). Better always use option SET DELETED ON and a special tag with deleted() index (that is also not always speeds up queries, so you will need to test).

5 chars instead of 8 chars indexes will have no much speed up. Better do not mess with this.

>I just discovered Bintoc() thanks to UT.
>
>I created a new field [cbintoc c(8)] in 2 tables and created an index on that field in each table. In each record validation() I put "replace cbintoc with bintoc(fk1) + bintoc(fk2)". (I've found that "select cbintoc..." is faster than "select bintoc(fk1)+bintoc(fk2)...".)
>I then did "select cbintoc from table1 where cbintoc not in (select cbintoc from table2)" and it was faster than my old select that used str() instead of bintoc() (great). Then I went back and made [cbintoc c(5)] and put "replace cbintoc with bintoc(fk1) + bintoc(fk2,1)" in record validation(). When I re-ran the select, it took longer.
>
>Both tables have about 70,000 records in each. Shouldn't it be quicker when the field/index is only 5 chars instead of 8?
>
>Also in table2, cbintoc is unique so I created a candidate index with !deleted() for filter. That seemed to slow the select down some also. Am I better off without the filter and just a regular index?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform