Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> select ... order by PK performance
Hi,
I have two tables. The PK are reversed.
create table de_autotest_basic_s
(c1 varchar2(8),
c2 varchar2(12), c3 number, constraint test_basic_s PRIMARY KEY (c1,c2 ));
create table de_autotest_basic_s
(c1 varchar2(8),
c2 varchar2(12), c3 number, constraint test_basic_s PRIMARY KEY (c2,c1 ));
When I use the following sql statement and found out the PK columns
are
in the same order in both cases.
SQL> select nvl(enabled,0) from sys.cdef$ where obj#=79994 and type# = 2;
NVL(ENABLED,0)
79995
SQL> select c.segcol# from sys.col$ c, sys.icol$ i where i.obj#=79995 and i.bo#=c.obj# and i.col#=c.col#;
SEGCOL#
1 2
I got about one million rows with my tables. I wonder what will be the performance if I use:
to both tables.
Same?
I know I can run a benchmark testing myself but I shared my server with other people. So, I may not able to get an accurate result.
Does any know have any ideas?
Thanks,
Kevin Received on Wed Oct 27 2004 - 19:03:16 CDT
![]() |
![]() |