Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need translation of basic foxpro commands into T/SQL
Message
De
04/09/2009 01:12:26
Walter Meester
HoogkarspelPays-Bas
 
 
À
03/09/2009 20:19:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01422348
Message ID:
01422578
Vues:
50
>>This could happen on very large tables. SQL server has a costbase optimizer. It means that it does do some statistical analysis on the usable indexes and the distribution of values.
>>
>>In the first query it could decide to use the index on Field3 and not to use the index on field2. It saves the executionplan and does use this for the second query. Since the index on field 3 then returns a lot of records now and it essentially does a table scan on field2, you'll get a dreadfull performance.
>>
>>I've identified a lot of performance problems on SQL server being caused by cached executionplans. Flushing them almost always solves them... until it occurs again.
>>
>>Not using parameters will prohibit the two queries to use the same executionplan and therefore will not have this problem.
>>
>>I understand that SQL2005 has a WITH RECOMPILE hint that will resolve this issue, but you're basically in dead water with SQL2000.
>
>Well upgrade then. What can happen w//o parameters is much more serious.
>Cetin

Well basically I don't have the authority to upgrade the SQL servers...Those are the clients responsibility... BTW, if you want to create serverside cursors (SELECT * INTO #CURSOR FROM ...), you cannot even use parameters. I know the risk of SQL injection is serious and we use paramerters where applicable, but there are circumstances where we simply cannot use them and are doing what we can to prevent SQL injection.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform