Re: Query tuning

From: Victor Kozel (victor_kozel_at_tut.by)
Date: 03/31/04


Date: Wed, 31 Mar 2004 12:48:41 +0300

Hi Mark,

Yes, I made updating for the statistic.
I have tried to use the query on Borland Interbase (the same db structure and data) It made good plan.
I think it does not have a sense to debug without data and the table have more than 150000 rows.

Thanks

  "Mark Allison" <marka@no.tinned.meat.mvps.org> wrote in message news:E22497EA-36C8-4C1E-BA4E-86CA08578D6B@microsoft.com...
  Victor,

  Are your statistics up to date? Running Update Stats might help the optimizer here. Failing that you might want to use index hints (with caution). Have you got an index on the correct columns? Posting a repro script here would help us to debug it.

  --
  Mark Allison, SQL Server MVP
  http://www.markallison.co.uk



Relevant Pages

  • Re: Why is this
    ... would be to have a single index on (lastrecon, acctnum, deposit) [or ... cover the query and handle the restrictive condition immediately. ... there is no perfect query plan. ... use the index for TOP 1, even if it used quite a few bookmark lookups, ...
    (microsoft.public.sqlserver.server)
  • Re: Query optimizer issue
    ... Consider a stored proc defined as follows: ... when compiling a plan. ... parameter @p1 into the query at compile time before a plan for the query ... execution plans, but a key requirement for everything to work as expected ...
    (microsoft.public.sqlserver.server)
  • 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: Store procedure vs Direct statement ???
    ... Try opening up query analyzer and checking out the query plan or ... advantages of using stored procedures over not using stored procedures is the ... the better the overall performance of your SQL ... dynamic sql versus the execution plan for a stored procedure. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SP runs slower than same query in Query analyzer. Why??
    ... Andrew your reply was useful but I'm quite new to sql server and I'm ... query gives me the results in 3-4 seconds. ... > Keep in mind that the server has to compile a complete execution plan ... > when compiling a plan. ...
    (microsoft.public.sqlserver.clients)