Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Proper database design for best performance?

Proper database design for best performance?

From: <jbrychka_at_my-deja.com>
Date: 2000/03/02
Message-ID: <89mg61$132$1@nnrp1.deja.com>#1/1

I would like some ideas on the best way to set up data for fast access.

I have a very large table that I look up for records that have not been processed. The query would look something like this:

select column_a
from table
where date_column is NULL

This type of query cannot use an index so it is very slow. To get around the index issue I was thinking of defaulting this date_column to a specific date that I would then put in my query. Something like this:

select column_a
from table
where date_column = :default_date

This way I could use an index. The only thing I don't like about this is that I am putting this bogus date value in the column.

Another option is to add an indicator column that would default to "N" for new records and then get updated to "Y" when processed. The issue I have with this is that I still need the date column to know when it is processed so now I have two columns instead of just one which causes the table to use more table space.

If anybody has any opinion on this or other alternatives, I would like to hear about it.

Thanks,

Jim

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Mar 02 2000 - 00:00:00 CST

Original text of this message

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