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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: partitioning questions

RE: partitioning questions

From: Viral Desai <viral303_at_hotmail.com>
Date: Fri, 22 Nov 2002 10:30:21 -0800
Message-ID: <F001.005098DC.20021122103021@fatcity.com>

My Views below...

Regards, Viral 

Scenario:

Range-Partition tableA on a service_date field by year; Range-Partition tableB on a posted_date field by year;

These tables are frequently joined using a separate field called charge_id, a surrogate key.

Queries against these tables usually include some sort of date filter, join on the charge_id field, and are done in parallel.

1) Would this configuration promote the use of partition-wise  joins between tableA and tableB by the optimizer?  -- NO, they have to be equi-partitioned and you have to specify atleast the leading keys in the join for both tables.

2) Would it be better to partition the tables (either range or hash) by the join field, charge_id?

-- SEEMS like a good choice since you always limit your query on charge_id, however data distribution in that column also plays a role.

> > 3) If we range-partition by date, subpartition by hash (charge_id), would queries that do not reference the date field, but do join the tables by charge_id still benefit?

- Dont think that would help. However, you could have a global index on charge_id on both tables. If you insist to partition the data as mentioned in #3, then for the benefit of your queries you may want the exclusive global index on charge_id. (As there are pros, there are cons for this too)

Again depending on the type of the data contents/value  of the columns, you could have 2 bitmap indexes (one on the date and another on charge_id, but this is not always advisable)

 

4) Is it more expensive, less expensive, or about equal to do a full table scan on a partitioned table vs the same table non-partitioned? -- I think it is same as non-partioned tables.



 

>From: "Gogala, Mladen"
>Reply-To: ORACLE-L@fatcity.com
>To: Multiple recipients of list ORACLE-L
>Subject: RE: partitioning questions
>Date: Fri, 22 Nov 2002 08:08:55 -0800
>
>That was not a good buy. Partitioning comes with Oracle 9, partitioning
>option is no longer sold separately.
>
> > -----Original Message-----
> > From: becker.bill@marshfieldclinic.org
> > [mailto:becker.bill@marshfieldclinic.org]
> > Sent: Friday, November 22, 2002 8:44 AM
> > To: Multiple recipients of list ORACLE-L
> > Subject: partitioning questions
> >
> >
> >
> > Hello,
> >
> > We are planning to move to Oracle 9.2 on as-yet-undecided platform
> > (probably red hat linux on ibm hardware).
> >
> > We finally pursuaded management to purchase the partitioning
> > license, and I have some questions on partitioning:
> >
> > Scenario:
> > Range-Partition tableA on a service_date field by year;
> > Range-Partition tableB on a posted_date field by year;
> > These tables are frequently joined using a separate field
> > called charge_id, a surrogate key.
> >
> > Queries against these tables usually include some sort of
> > date filter, join on the charge_id field, and are done in parallel.
> >
> > 1) Would this configuration promote the use of partition-wise
> > joins between tableA and tableB by the optimizer?
> > 2) Would it be better to partition the tables (either range or hash)
> > by the join field, charge_id?
> > 3) If we range-partition by date, subpartition by hash (charge_id),
> > would queries that do not reference the date field, but do join
> > the tables by charge_id still benefit?
> > 4) Is it more expensive, less expensive, or about equal to do a
> > full table scan on a partitioned table vs the same table
> > non-partitioned?
> >
> > As always, thanks to any responders.
> > becker.bill@marshfieldclinic.org
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author:
> > INET: becker.bill@marshfieldclinic.org
> >
> > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > San Diego, California -- Mailing list and web hosting services
> > ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> >
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Gogala, Mladen
> INET: MGogala@oxhp.com
>
>Fat City Network Services -- 858-538-5051 http://www.fatcity.com
>San Diego, California -- Mailing list and web hosting services
>---------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).


MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Viral Desai INET: viral303@hotmail.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Nov 22 2002 - 12:30:21 CST

Original text of this message

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