Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Going parameterized causes problem
Message
De
30/09/2008 15:48:41
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01351844
Message ID:
01351897
Vues:
16
>Try to add
>
>OPTION (RECOMPILE)
>
I have found that if I remove the TOP 100 clause that this helps. Basically, I get results within a second or up to three seconds. When I have this clause, it can take between 20 and 100 seconds. So, basically, I have removed it from the six locations where it was before in the code.

However, with OPTION (RECOMPILE), the result was instant. I also tried with other searches and it is always as VFP was doing it.

I also found that with OPTION (RECOMPILE), queries that were running before without the TOP 100 clause, which were running ok, are also faster.

What does it do exactly? Should I include that in all my SQL exec command?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform