Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Wrong number of rows in tkprof?
"Rene Nyffenegger" <rene.nyffenegger_at_gmx.ch> wrote in message
news:Xns90F9445F979EAgnuegischgnueg_at_130.133.1.4...
> Hi
>
> I decided to get to know tkprof better.
> Therefore, I created two tables without any indexes,
> and filled these with 2 and 6 rows, respectively:
>
> create table category (
> id int,
> description varchar(50)
> );
>
> create table thing (
> id int,
> description varchar(50)
> );
>
>
> insert into category values (1, 'fruits');
> insert into category values (2, 'beers');
>
> insert into thing values (1, 'apple');
> insert into thing values (1, 'banana');
> insert into thing values (1, 'apricot');
> insert into thing values (1, 'pears');
>
> insert into thing values (2, 'heineken');
> insert into thing values (2, 'budwiser');
>
>
> Then, I altered my session as follows:
>
> alter session set sql_trace=true;
> alter session set timed_statistics=true;
>
> Then, the query:
>
> select t.description from thing t, category c where t.id=c.id and
> c.description='beers';
>
> Then, in order to close the cursor for that statement:
>
> select 1 from dual;
>
> tkprof output:
>
>
The number you are seeing is the cardinality as computed by the optimizer. How did you analyse those two tables, if at all?
Hth,
Sybrand Bakker, Senior Oracle DBA Received on Fri Aug 10 2001 - 12:49:43 CDT
![]() |
![]() |