Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL Select Question
Divers
Thread ID:
00271745
Message ID:
00271745
Vues:
47
I have a select statement that I am pretty sure is not being optimized correctly.

I have a table with 200,000 records and when I issue the following select statements they both take the same amount of time.

**************************
SELECT * FROM SCTTKW WHERE at('APPLE',ttk_keyword) > 0 and at('M',ttk_type) > 0
***************************

Now, with the statement above I would think would have to go through every record to see if 'APPLE' exists anywhere within the field ttk_keyword.

*********************
SELECT * FROM SCTTKW WHERE TTK_KEYWORD = 'APPLE' and ttk_type = 'M'
*********************

I have 10 records within the 200,000 where ttk_keyword is 'APPLE' and ttk_type = 'M'. I have an index set up which is "ttk_keyword+ttk_type".

I would think that this statement should be able to "jump" to the first record that has 'APPLE' and then quit after the last record that has apple. But this statement isn't any faster than the previous one.

Am I doing something wrong?

Thanks,
Paul
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform