Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help Optimizing a query
Message
De
14/08/2001 15:17:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
14/08/2001 14:22:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00542086
Message ID:
00543701
Vues:
18
>>>>>1. I am accessing the data locally.
>>>>>2. The total number of records is 7,127.
>>>>>3. The speed is approximately 17 seconds with this data set.
>>>>>
>>>>
>>>>Did you tried to delete tags all and add them one by one by adding a new condition? 17 sec. seems too long for me. It should be 1-3 sec. Did you try it on different machines?
>>>>
>>>>>>Did you access this table locally or through the network? What's the number of records in a table and what speed do you get?
>>>>>>
>>>
>>><snip>
>>>
>>>The last thing I tried was to create a simple index which would return 20000 records. This test CDX contains no other indexes other that the one index. I ran a test on this one index and it still took 27+ seconds on my machine.
>>
>>Can you please provide more details? Especially, what is the SQL - SELECT command, and what index(es) you have?
>>
>>Hilmar.
>
>In this case I have a table with about 1.2 million records.
>I have a character field which as a width of one called RampCode.
>I have one index only on the RampCode field.
>As a pre-digest idea, I was going to store the values into this table so that
>my Sql would be basically like this.
>
>Select * From VinData Where RampCode = lcRampCode Into Cursor qDetails NoFilter
>
>This takes approximately 21 seconds. I've updated the time from 27+. That was with SET DELETED ON.

I just did some testing on my own.

Jim is completely right - you save a lot of time by NOT including all fields.

Apart from that, I can only say that you are indeed giving Visual FoxPro a lot of work, perhaps unnecessary. Do you really need the 20,000 records? Or rather a summary calculation based on them? In the latter case, it may or may not be feasible to have summary records in separate table(s).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform