Re: Creating extended stats on a ASCENDING/DESCENDING index

From: joel garry <>
Date: Tue, 5 Jun 2012 13:43:31 -0700 (PDT)
Message-ID: <>

On Jun 5, 10:21 am, Mladen Gogala <> wrote:
> I have an index which is created with "DESC" option and is not being used
> unless a hint is used. I am trying to create an extended statistics but I
> cannot get the syntax right:
> select dbms_stats.create_extended_stats(user,'EMP','("SAL" DESC)') from
> dual;
> select dbms_stats.create_extended_stats(user,'EMP','("SAL" DESC)') from
> dual
>        *
> ERROR at line 1:
> ORA-20001: Error when processing extension -  missing right parenthesis
> Has anybody done it?
> --

I dunno, but my first reaction is it expects either a comma, a closing parens or an operator after the "SAL". The DESC would be an index DDL, and maybe there is an FBI issue there, too.


-- is bogus.
"If you think about what the optimizer does to calculate the cost of a
query, you will realise that one of its steps is to work out the
amount of data to be accessed and sorted. Oracle Corp. has been
working on this for many years and still hasn't got it right. " -
Jonathan Lewis
Received on Tue Jun 05 2012 - 15:43:31 CDT

Original text of this message