var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Short question about creating indexes
I'm a little confused whether I need or don't need to create an index and need your advice.
The situation is as follows :
Now, I have a web page which lists the orders of the department of the logged-in user.
That's why this table already has an index like this :
But now, our customer wants a report, where I have to go the other way, list the total price at one day, as in :
select count(*) from orders where creation = <today> group by DepartmentID
should I crate an index like :
or would Oracle be clever enough to use Index 1 ?
(I personally think, this doesn't have anything to do with the capability of Oracle, but rather with the understanding of indexes, but I'm not sure).
Do I have to create Index 2 ?
Run EXPLAIN PLAN and you will know.
Originally Posted by msegmx
Thanks for the tip, that helped !!