Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exact and deleted recs - did everybody know this but me?
Message
De
24/07/2006 15:02:29
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
24/07/2006 15:00:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01139176
Message ID:
01139389
Vues:
12
>The original select is into an array. The system is written needing that array, so at some point, I have to put the records into that array (or I can rewrite the system in heaven only knows how many areas). Doing it the way I was doing it only required a few lines of code and everything ended up looking exactly as the original code meant it to. I'm not sure USE AGAIN and SET FILTER is going to buy me anything. Would scanning the filtered table and putting it into the array that way be faster? SET FILTER used to make things really slow, and I've pretty much avoided using it.

It only made things slow if you didn't know how to use it. Or if you used it with a grid. It operates on the same Rushmore rules as the SQL. In this case you're actually using SET FILTER, so it's obviously not slow.

>
>>Why don't you do directly what Query does implicitly? This way it'll be clear what you're doing.
>>
>>SELECT 0
>>USE mytable AGAIN ALIAS t2
>>SET FILTER TO < where conditions >
>>...
>>
>>
>>>Fortunately (or not, depending on your pov), the SQL statement is hard coded and not subject to user interference. It is used for a very specific purpose which would become worthless anyway if somebody changed it. It's a real simple statement, but even though there is an index exactly matching the where clause, and an index on DELETED(), when it runs on a table of about 100,000 records, it takes about 10 seconds to run. Doing what I'm doing brings it down to sub 1 second. I'm going to continue trying to find a better option, but I think for now, I may just have to treat this as a temporary fix.
>>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform