MySQL Forums
Forum List  »  Partitioning

Simple question about partitioning
Posted by: Ken Camann
Date: June 24, 2008 11:34AM

I have a quick partitioning question. Suppose I make a table like this

CREATE TABLE t(
unique_id SERIAL,
group_id BIGINT NOT NULL,
data INT
);

and the table is huge. I know that most of the time, I only want rows that are in the same group, so I partition it by the groups (group_id). However, what happens when I want to look something up by the primary key (unique_id)? I assume that is very slow, i.e., the performance of the table being unpartitioned. Is that correct? And is there something else I should be doing here?

From what I understand, it will be possible to use foreign keys soon in partitioned table. Would that have the same performance characteristics as the above scenario? Although I would never SELECT rows with differing group_ids, it seems like a foreign key referencing the unique_id would not have the knowledge to take advantage of the partitioning system.

Thanks,
Ken

Options: ReplyQuote


Subject
Views
Written By
Posted
Simple question about partitioning
3855
June 24, 2008 11:34AM


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.