Re: QUERY Tune

  • From: Dan Tow <dantow@xxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 2 Apr 2004 16:36:56 -0800

Trying again to cope with the <50% quote rule:

Here's a good, simple minimum for the information needed to tune a query
reasonably efficiently:

-The current execution plan.
-The list of indexes on the tables, with their columns, in order, and which of
these are unique.
-The selectivity (as a percentage of rows in the affected table) of
single-table
conditions mentioned in the WHERE clause, such as "live_p = 't'"
-The complete view-defining query text of any views mentioned in the SQL, as
well as  any views mentioned in those views,...
-The number of rows the query returns.
-The number of rows and name of the biggest table (sanity check, combined with
the previous datapoint to determine whether the usual assumptions about filter
independence and rowcounts before and after joins hold).
-The current runtime of the query.
-The target runtime of the query (helps determine how radical the solution
might
need to be).

Yours,

Dan Tow
dantow@xxxxxxxxxxxxxx
650-858-1557
Author, SQL Tuning, O'Reilly


Quoting Seema Singh <oracledbam@xxxxxxxxxxx>:

> Hi,
> 
> select sp.page_id as page_id,one_line_item_desc, sp.page_title as 
> page_title, sp.url_stub as  Url_stub,          sum(category_score) as 
> cat_count,
> ...
>       .url_stub     order by cat_count desc, name_count desc, content_
>       count desc
> 
> 
> This query is very slow,some times its hanges.Please suggest if anything you
> 
> find?
> thx -Seema

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: