Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: simple sql optimize help/mlml

Re: simple sql optimize help/mlml

From: Michel Lee <ae299_at_FreeNet.Carleton.CA>
Date: 18 Jun 2004 17:39:23 GMT
Message-ID: <cav9cb$k09$1@freenet9.carleton.ca>

THIS IS the exec plan
Execution Plan


   0 SELECT STATEMENT Optimizer=CHOOSE (Cost=5039 Card=1 Bytes=12)    1 0 SORT (AGGREGATE)
   2 1 TABLE ACCESS (BY INDEX ROWID) OF 'WLOG' (Cost=5039 Card=1769 Bytes=21228)

   3 2 INDEX (RANGE SCAN) OF 'USER_ID_IX' (NON-UNIQUE) (Cost=24 Card=10562)

SQL> SELECT count(1) FROM wlog
  2 WHERE

  3      LOG_DATE > '14-JUN-04' and
  4      user_id=6;

  COUNT(1)

      696
Elapsed: 00:00:46.07

Sybrand Bakker (gooiditweg_at_sybrandb.verwijderdit.demon.nl) writes:
> On 18 Jun 2004 17:08:23 GMT, ae299_at_FreeNet.Carleton.CA (Michel Lee)
> wrote:
>

>>What can i do to improve on the speed without using concatednated indexes
>>create index userlogdate_ix on ws_log
>>  (user_id,log_date)  tablespace websenseixts NOLOGGING;

>
>
> Not much apart from posting the explain for the original query, which
> you for some reason left out.
> Other than that 'indexing every column is beneficial for performance'
> is of course a fairy tale.
>
>
> --
> Sybrand Bakker, Senior Oracle DBA
--
/-------------------------------------------------------------------/
/             http://miccc.com                                      /
/-------------ae299_at_ncf.ca------------------------------------------/
Received on Fri Jun 18 2004 - 12:39:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US