Currently I'm working on a legacy system that does partitioning at the application level. A line item table with a million rows (for example) have be split into two tables so that each table gets 500,000 thousand rows. I don't have experience with data partitioning so I'm not sure if this is the right way to do it. I have two questions regarding this: If this is an acceptable way to do this, how would it work with foreign key relationships? If this is not an acceptable way to do this, how would one have partition logic at the application level.
if (LineItemID < 5000000) {
GetLineItemFromTableA();
} else {
GetLineItemFromTableB();
}
Update - The data is retrieved through a simple stored procedure (Select column1, 2, 3 From TableName). The data is used for reports and a web application.