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: Strange Cost Based Optimizer Decision Making

Re: Strange Cost Based Optimizer Decision Making

From: Jimbo1 <nightfanguk_at_yahoo.co.uk>
Date: 19 Dec 2005 08:15:48 -0800
Message-ID: <1135008948.124164.115450@g14g2000cwa.googlegroups.com>


Hello all,

Looks like I'll have to eat the words of my previous posting. This could well be the problem. The order of columns in the composite indexes are different. TIME_STAMP is the first column in the index on HUGE_TABLE. It's the last column in the index on LARGE_TABLE.

Here's the proof:

SQL> SELECT * FROM user_ind_columns
  2 WHERE index_name IN ('LARGE_TABLE_PK', 'HUGE_TABLE_PK')   3 ORDER BY index_name, column_position;

INDEX_NAME TABLE_NAME COLUMN_NAME COLUMN_POSITION COLUMN_LENGTH DESC

--------------------- -------------------- ---------------
--------------- ------------- ----
HUGE_TABLE_PK         HUGE_TABLE           TIME_STAMP
 1             7 ASC
HUGE_TABLE_PK         HUGE_TABLE           LINK_ID
 2            22 ASC
LARGE_TABLE_PK        LARGE_TABLE          SECTION_ID
 1            22 ASC
LARGE_TABLE_PK        LARGE_TABLE          TIME_STAMP
 2             7 ASC

Thanks very much for pointing that out to me Spendius.

Much appreciated. I'll recreate the index and re-rerun this test. That's going to take a while, but I'll update this post with the outcome later for anyone who might be interested.

Cheers.

James Received on Mon Dec 19 2005 - 10:15:48 CST

Original text of this message

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