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: why administrator refuse to give permission on PLUSTRACE

Re: why administrator refuse to give permission on PLUSTRACE

From: Hasta <hasta_l3_at_hotmail.com>
Date: Sat, 3 Nov 2007 18:58:48 +0100
Message-ID: <MPG.2196d54575db67598969c@news.dommel.be>

> And just because I'm in the mood here's another one I give my students.
> Here's the setup.
>
> CREATE TABLE t (
> doc_id VARCHAR2(10),
> person_id NUMBER(7),
> doc_name VARCHAR2(45));
>
> CREATE INDEX ix_t_person_id
> ON t(person_id);

The main problem is : this table lacks a primary key

> That's was the set up. Here's the query identified as the problem.
> SELECT doc_name
> FROM t
> WHERE person_id = 221;
>
> Hint: You can get the cost to 1 with CPU = 0.

I get cost 2 with an index on (person_id, doc_name)

If more is really needed, I would dig out tom kyte's books and consider playing with the index, using another table organization, etc...

Calmly and very carefully. Received on Sat Nov 03 2007 - 12:58:48 CDT

Original text of this message

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