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: Need Help Creating Index

Re: Need Help Creating Index

From: John Darrah <john.darrah_at_usa.net>
Date: 30 May 2001 15:59:18 -0700
Message-ID: <4af5a619.0105301459.7b68d488@posting.google.com>

I am reading the right most column of your description of the table to be the number of distinct values for that column in the table. If that is the case, you could try putting bitmap indexes on time, region, company, and mabey even lineitem depending on what columns will be queried on. You can then throw btree indexes on the bottom two values. Finally, you can insert with an order by clause to pack the data in the way it is most often queried.

anuragmin <anurag_minocha_at_hotmail.com> wrote in message news:<1277.990795302194_at_iw0.mailusenet.com>...
> Hi,
> I have a table with 6 1/2 million records which will be basically
> used for querying over the web.
>
> The data will be inserted weekly. First all the data in the table
> will be truncated and then the whole thing will be uploaded
> again. The average table growth is approximately 25000
> records per month.
>
> Below is the table structure with the number of distinct values
> the column has in the right most column
>
> SQL> desc test
> Name Null? Type Distinct
> ------------------------------- -------- ---- --------
> COMPANY VARCHAR2(10) 478
> TIME VARCHAR2(10) 39
> REGION VARCHAR2(10) 43
> LINEITEM VARCHAR2(15) 872
> ACTUAL NUMBER(20,6) 1087248
> ACTUAL_US NUMBER(20,6) 1158499
>
>
> The type off queries that will be run on this table are
> * Give me all the records for a particular company for a
> particular time.
>
> *Give me the sum of all the actual and actualus for a
> particular company
>
> etc etc.....
>
> I need suggestions on how to create index on this table and
> anything else which you guys can think of which will speed
> up the queries.
>
> Thanks
> Anurag
>
> ----
> Posted via http://www.etin.com - the FREE public USENET portal on the Web
> Complete SEARCHING, BROWSING, and POSTING of text and BINARY messages!
Received on Wed May 30 2001 - 17:59:18 CDT

Original text of this message

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