-1

I would like to start with saying that I am still learning PL/SQL. I was wondering if you could share your opinion on the following topic/questions. Basically, I want to insert data from Table X into Table Y via a package. I have already read about the inserting part, so this is clear, however I was wondering what will happen with existing partitions. Lets say that Table Y has partitions. What will happen when we insert new data from Table X? Will it be divided into the partitions or not? Or what if i have interval partitions, will they grow based on the incomming data from Table X? Do I need to “trigger”/ call the partitions inside the package?

Thank you in advance for your help! I am just looking for tips and advises so that I can figure out how to setup my tables and the package (in case i need to call the partitions there). Like for example should I have interval partitions or not.

Thank you for your time!

VBABegginer
  • 91
  • 1
  • 1
  • 7

1 Answers1

1

If the data you're inserting fits the definition of the existing partitions then the new data will be added to the existing partitions. If the new data does not fit the definition of any existing partition, then either

  • a new partition will be created for the new data, if the table is set up to do so, or

  • the insert will fail and you will have to manually create a new partition capable of holding the new data.

Which of the above situations will happen in your case depends entirely on how your table was created, on what partitions already exist, on what the partitioning method and key is/are, and on the data you're trying to insert.

You don't have to "do" anything in your code to tell it which partition to use. A partitioned table behaves no differently than a non-partitioned table.

Best of luck.