Re: How to partition my table
Posted by:
Aftab Khan
Date: March 19, 2009 05:34AM
>Now if I partition it with alter table say P1 will hold ID from 1 to 1000, P2 1001 to 2000 and so on.
How many rows do you have in `Employee` table? if you have e.g. 10000000, in this case you need 10000 partitions.
lets do some tests
CREATE TABLE Employees (
EmpID INT NOT NULL,
....
)
PARTITION BY KEY()
PARTITIONS 4;
Load data into this table...
>Now should the query be same or I have to rewrite it as
yes your query will remain same
And then verify the partition used
EXPLAIN PARTITIONS SELECT * FROM Employees WHERE EmpID=1000;
Subject
Views
Written By
Posted
10371
March 15, 2009 09:36AM
4747
March 15, 2009 01:09PM
4009
March 17, 2009 10:35PM
3630
March 18, 2009 12:16AM
3466
March 18, 2009 09:12PM
3440
March 18, 2009 10:19PM
3771
March 19, 2009 05:18AM
Re: How to partition my table
3731
March 19, 2009 05:34AM
3429
April 06, 2009 08:08AM
3958
April 07, 2009 09:44PM
2788
April 08, 2009 08:00AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.