0

What is the best practice to be used on Bluemix for purging of data from the db2 storage service? Say we want to purge a large amount of data, say a million entries of a particular communication to customers ?

data_henrik
  • 16,724
  • 2
  • 28
  • 49
vikram
  • 61
  • 4
  • The answer depends on how the table was created. If you use range-partitioning or multi-dimensional clustering, purgin is simple. If you want to delete all rows, there is `TRUNCATE`. – data_henrik Aug 18 '15 at 04:56
  • Consider it is range partitioned table , then how to perform it in Bluemix ? What will be the best practice to be used here. Since data will be purged basis the date of communication to the customer. – vikram Aug 18 '15 at 11:54

1 Answers1

1

You may look into this tutorial that describes the data purge algorithm for DB2.

http://www.ibm.com/developerworks/data/library/techarticle/dm-1501data-purge-db2/index.html

However, as SQL Database is a fully managed service, you will not be able to follow the exact instructions as described. For example, you will not be able to tune db cfg and dbm cfg for optimal performance. Also note that you will not have access to a shell script, so you may have to enter individual SQL command individually through a client like data studio.

On the other hand, if you are using the DB2 on Cloud service, it would be able to follow the above instructions.

CharlesL
  • 942
  • 5
  • 14
  • In case of SQL database service being used. What is the way out , in case large amount of data needs to be purged , say of a certain date. Is it suggested to use IBM DB2 as Cloud Service or SQL Database service. – vikram Aug 19 '15 at 04:34
  • If you are looking for a fully-managed service, then you can keep using SQL Database service. You should still be able to do the core steps (like export and load) from the tutorial article. You may suffer slightly from not being able to tune your parameters, and more complexity is not being able to run all the SQL statement through a shell script, but it should still be possible to use the described method. Otherwise, DB2 on Cloud is a good option if you like customization and don't mind the added responsibility of administrating and maintaining your database. – CharlesL Aug 19 '15 at 14:56