Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: help: partitioning question
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.
--
"Some days you're the pigeon, and some days you're the statue." Received on Sat Dec 18 1999 - 05:55:37 CST
![]() |
![]() |