rickrude11
IS-IT--Management
Hi experts,
I have a table that will potentially grow to 750 million records. To deal with this, I need to split the table into multiple tables via a trigger or something. Can anyone help with how to do that? I don't need line by line syntax or anything, just some general logic.
Here is the basic structure of table called MAIN.
DEVICE | FIELD1 | FIELD2 | FIELD3
5 data data data
5 data data data
33 data data data
2 data data data
61 data data data
12 data data data
There are up to 100 'DEVICES' and I would like to fork each distinct device into a new table of its own. I tried using the DEVICE field as the table name in a trigger but failed.
I would like to end up with a separate table per device. Based on the above mock table, I should end up with 5 different tables called table_5, table_33, table_2, table_61, table_12. And of course having the corresponding rows in those tables.
DB admins look at me funny when I ask this, I don't know why. I am no DB guy by any means, but have been assigned this task nevertheless.
Thanks!
I have a table that will potentially grow to 750 million records. To deal with this, I need to split the table into multiple tables via a trigger or something. Can anyone help with how to do that? I don't need line by line syntax or anything, just some general logic.
Here is the basic structure of table called MAIN.
DEVICE | FIELD1 | FIELD2 | FIELD3
5 data data data
5 data data data
33 data data data
2 data data data
61 data data data
12 data data data
There are up to 100 'DEVICES' and I would like to fork each distinct device into a new table of its own. I tried using the DEVICE field as the table name in a trigger but failed.
I would like to end up with a separate table per device. Based on the above mock table, I should end up with 5 different tables called table_5, table_33, table_2, table_61, table_12. And of course having the corresponding rows in those tables.
DB admins look at me funny when I ask this, I don't know why. I am no DB guy by any means, but have been assigned this task nevertheless.
Thanks!