In general, the invention relates to a method and system for migrating tables in databases. The method may include calculating a first plurality of migration factors for a first set of tables in a source database using a plurality of pre-calculated factors and a first plurality of dynamically-calculated factor, where each of the first plurality of migration factors is associated with one of the first set of tables. The method may further include selecting a first table from the first set of tables to migrate based on the first plurality of migration factors; and migrating the first table to a target database.