Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Trivial Query on Partition

Status
Not open for further replies.

engineer2100

Programmer
Feb 7, 2002
285
US
Hi can anyone help me with this

I have a table that is partitioned, lets say P1 and P2. If i need to select from P1 or P2 i mention that Partition name within my SELECT.

I have two queries

1. What if I dont provide any Partition but within my WHERE mention the Column on which the partition was done?
2. What if I dont provide any Partition and also don't specify within the WHERE clause the column used for partitioning?

How will the SELECT behave for the above two scenarios?

Thanks,
Engi
 
1) If you include a condition which means the select can be wholly satisfied from a single partition, then the optimiser should work out that it only needs to look at that one partition.

2) It will scan all the partitions to satisfy the query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top