Re: Weird one.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



It's likely the result of the way SQLS handles query execution plan
caching. The first time a query runs, it takes longer. Subsequent
executions are faster because the plan is reused. See the topic
"Execution Plan Caching and Reuse" in SQL Server Books Online for more
information. One workaround to avoid the first-time perf hit is on
startup to run those queries in the background so plans are cached and
available for reuse. This may or may not work depending on the type of
applicaton you have.

--Mary

On Mon, 8 Aug 2005 12:01:27 -0400, "Shawn" <shawn.camner@xxxxxxxx>
wrote:

>I have a dataset named "dsMessages" that has a single table. I have a timer
>that runs a query against an SQL db every 5 seconds. At the beginning I have
>it run dsMessages.Clear(). The first time this runs, it causes a long pause,
>but then it runs fine every time thereafter. I have other datasets in the
>application that seem to do the same thing... Any ideas?
>

.



Relevant Pages

  • Re: please share how you resolved
    ... Yep, it could happen, perhaps you need to re-write the query. ... I am exactly having same problem but this is from sql 2000 to ... On checking the Execution Plan, ... Clustered Index Seek on SQL 2000 whereas it is using Clustered Index Scan ...
    (microsoft.public.sqlserver.server)
  • Re: OutputTo & Crosstab Queries
    ... SQL with unnecessary brackets, and can safely discount that as a possibility. ... I'll do more research on your comments about Execution Plan - from the way ... When you save a query, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Execute SQL UD Function call timeout, 1-3 seconds in query ana
    ... We did build a little ASP.NET page yesterday that lets us put a given sql ... query into a text box and then return the execution plan (using Showplan_Text ... Query Analyzer. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Execution plan for view
    ... Tibor Karaszi, SQL Server MVP ... between two tables with various join criteria and the criteria is static. ... When this query runs with various values in the two ... optimizer will need to redo the execution plan. ...
    (microsoft.public.sqlserver.programming)
  • Re: Query Tuning Help - Sum multiple columns
    ... The table has 171,000 rows, but the query takes 20 minutes to ... Something does not look right with your SQL statement - you alias ... SUMas VALUE1 and then include VALUE1 in the GROUP BY ... Now, retrieve the execution plan: ...
    (comp.databases.oracle.server)