If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

NOTE: My select and updates statements uses a
where clause which is always
in the order of the index craetion.

e.g where EMP_NO = and EMP_CODE = and MY_CODE=

QUESTION:
Currently the index is being used correctly
for all the sql's

If I change the way the table is created
using the indexed columns as the
first columns during the table creation
(like the example below) before the other
columns, would this increase the speed of my queries?

Mind you, it does take a small amount of time to move across the columns of a given row, so there is some small benefit to moving shorter and/or more oft-used columns towards the beginning of the row. Here is a thread where we discuss some of these issues: http://www.dbasupport.com/forums/sho...threadid=29359 (a lengthy read, but good info).

In your exact case, however, there will be no difference whatsoever. First, understand that column order in the WHERE clause does not matter at all (read: 99% of the time). Now, I am assuming that the optimizer is using the index in question. Therefore, the optimizer will use the index to get the ROWIDs for the rows that satisfy the specified predicates. It will then use the ROWIDs to get to the physical rows, *not* the 3 column values. Effectively, it will not be looking at those 3 columns *in the table* at all, so their physical location within the row is irrelevant (for this particular usage).

Make sense?

Note that there are many other things that could be done. As I said in the thread I linked above, switching to numeric IDs would be particularly beneficial here, but that's a topic for another day ;D