By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,682 Members | 1,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,682 IT Pros & Developers. It's quick & easy.

simple question about indexes

P: n/a
Hello !

I create the index
CREATE INDEX details_loaded ON details (loaded);
where loaded - CHAR(1) DEFALUT 'N'.

The column details.loaded used to determine is this row
processed or not, so index details_loaded used to speed up
request when my program fetch not loaded records.

In a first release I use
UPDATE details SET loaded='Y' WHERE ...

but I hear later that Oracle do not index really rows with
NULL keys, so I birn my second variant:
UPDATE details SET loaded=NULL WHERE ...

as far as details table is huge and volatile, by this method
I tries minimize system overhead by this index - number of rows
WHERE loaded='N' is much less total number of rows.

Please let me know really this technique save my space and speed up
my request??
P.S. The RDBMS PostgreSQL have `conditional indexes` -
this way I can write

CREATE INDEX details_loaded ON details (loaded) WHERE loaded='N'
and DBMS will index only pointed rows (loaded='N'), but we have Oracle..
--
best regards,
Ruslan A Dautkhanov ru*****@scn.ru
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.