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: help: partitioning question

Re: help: partitioning question

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sat, 18 Dec 1999 19:55:37 +0800
Message-ID: <385B7639.6F6B@yahoo.com>


kal121_at_yahoo.com wrote:
>
> In order for a partition to be accessed by a SQL query, does the query
> have to reference the partition key directly, or does it not matter?
>
> For example, if I define my_table as:
>
> id number
> name varchar2(40)
>
> and I partition on id, would the following querys *both* access an
> individual partition, or only the first one?
>
> SELECT * from my_table
> WHERE id = 1;
>

Yes - partition elimination will occur

> SELECT * from my_table
> WHERE name = 'Joe';
> or would this second query access *all* partitions, because I am not
> referencing the partition key directly?

All partitions will be read

>
> I wouldn't think it would matter which columns are referenced in the
> WHERE clause, but I remember reading somewhere that it does...
>
> Thanks
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Comments inline.
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Sat Dec 18 1999 - 05:55:37 CST

Original text of this message

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