Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: performance problem : tkprof show many fetches with high elapsed time
Sorry Matt,
that's not correct, your query should return exactly the number of
records in the table if ID is unique.
Well, it does.
select count(*) from aml0_PP.PROFILESTOREDATA;
returns same as
select count(distinct id) from aml0_PP.PROFILESTOREDATA;
So definitely unique column. By the way, you can see in query plan, Oracle reads the index via Index Unique Scan.
Strange.
mccmx_at_hotmail.com schreef:
> > I know ! It's hard to believe but the ID column is unique. Proof just
> > below. I would very much like to find out why the update which executes
> > 12 times updates more than 72K records. I would expect only 12 updates
> > since ID is unique. What is happening here ?
>
> Whoa, that is wierd...!
>
> Try running this SQL below.... (bearing in mind that the query will
> full table scan that large table and potentially take a while).
>
> select count(distinct id) from PROFILESTOREDATA;
>
> You should get 1 returned....
>
> Matt
Received on Fri Jan 05 2007 - 05:17:54 CST