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

Home -> Community -> Usenet -> c.d.o.tools -> Re: I HAVE A PROBLEM!!!

Re: I HAVE A PROBLEM!!!

From: <jscichocki_at_my-deja.com>
Date: Tue, 26 Sep 2000 19:53:58 GMT
Message-ID: <8qqusi$bdh$1@nnrp1.deja.com>

How big is this table that you created? If it's not that big, have tried creating and using the table without any indexes. I'm no index expert or anything, but I have found that smaller table will run faster doing a full table scan than it will searching an index to find the records.

Just a thought...

In article <8qqr3r$ght$1_at_spiney.sierra.com>,   "Steve McDaniels" <steve.mcdaniels_at_sierra.com> wrote:
> This is another example where composite indexes provide poor
 performance.
>
> in your
>
> select * from articulos where empresa = 1
> order by descripcion
>
> Oracle performs an full index scan.
>
> Drop all indexes on this table
>
> create index i_table_empresa on <table> (empresa);
> create index i_table_codigo on <table> (codigo);
> create index i_table_descripcion on <table> (descripcion);
>
> select * from articulos where empresa = 1
> order by descripcion
>
> This will be much faster.
>
> "Manuel Fco. Fernández Ponce" <mfdez_at_sgie.com> wrote in message
> news:8pvpoo$jms$1_at_diana.bcn.ttd.net...
> > I`M WORKING WITH ORACLE8 FOR NT.
> >
> > I HAVE CREATED ONE TABLE LIKE THIS
> >
> > ID NUMBER(9)
> > EMPRESA NUMBER(9)
> > CODIGO VARCHAR2(10)
> > DESCRIPCION VARCHAR2(40)
> > ...
> > MORE FIELDS...
> > ...
> > INDEX
> >
> > INDEX_001 FIELDS(EMPRESA,CODIGO)
> > INDEX_002 FIELDS(EMPRESA,DESCRIPCION)
> >
> > WHEN I HAVE A SELECT LIKE THIS:
> >
> > SELECT * FROM ARTICULOS
> > WHERE EMPRESA=1
> > ORDER BY DESCRIPCION
> >
> > IT TAKES A LOT OF TIME TO GIVE ME THE FIRST ROWS.
> >
> > AND IF I DO:
> >
> > SELECT * FROM ARTICULOS
> > WHERE EMPRESA=1
> >
> > IT TAKES A FEW TIME.
> >
> > AND IF I DROP INDEXES IT TAKE THE SAME TIME OR LESS.
> >
> > WHAT HAPPEND, PLEASE??
> >
> >
> >
> >
> >
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Sep 26 2000 - 14:53:58 CDT

Original text of this message

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