Remove deployment table for a type












1















In the current project(which is live), we have a type CSCategory with the deployment table. CSCategory extends Category also there are many references to CSCategory from other types. It could be 1-1, 1-N or N-N.



Obvious, this leads to performance issue and we are facing it. So we want to remove the deployment table for CSCategory type.



I know this steps



Any better approach? or the only way is to export CSCategory data along with dependent types data and reimport it?










share|improve this question





























    1















    In the current project(which is live), we have a type CSCategory with the deployment table. CSCategory extends Category also there are many references to CSCategory from other types. It could be 1-1, 1-N or N-N.



    Obvious, this leads to performance issue and we are facing it. So we want to remove the deployment table for CSCategory type.



    I know this steps



    Any better approach? or the only way is to export CSCategory data along with dependent types data and reimport it?










    share|improve this question



























      1












      1








      1








      In the current project(which is live), we have a type CSCategory with the deployment table. CSCategory extends Category also there are many references to CSCategory from other types. It could be 1-1, 1-N or N-N.



      Obvious, this leads to performance issue and we are facing it. So we want to remove the deployment table for CSCategory type.



      I know this steps



      Any better approach? or the only way is to export CSCategory data along with dependent types data and reimport it?










      share|improve this question
















      In the current project(which is live), we have a type CSCategory with the deployment table. CSCategory extends Category also there are many references to CSCategory from other types. It could be 1-1, 1-N or N-N.



      Obvious, this leads to performance issue and we are facing it. So we want to remove the deployment table for CSCategory type.



      I know this steps



      Any better approach? or the only way is to export CSCategory data along with dependent types data and reimport it?







      performance migration hybris






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 29 '18 at 4:57







      HybrisHelp

















      asked Nov 28 '18 at 11:25









      HybrisHelpHybrisHelp

      2,96011346




      2,96011346
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I have done what you have suggested in our project.



          Since the records are already in Table_X, you would have to export the items of Type_X, remove the items of Type_X (which will remove them from Table_X), and reimport them as Type_Y. If there are other types dependent on them, you would have to consider them in the data migration as well.



          After that, it should be safe to remove the deployment tag, and to drop the database table. If necessary, you have have to remove the orphaned types via HAC as well.



          I can't think of another or better way of doing it.






          share|improve this answer
























          • What I am trying is, exported CSCategory data >removed deployment tag from code > update the system > then will try to reImport data let's me see what happen. I hope all 'CSCategor` atrributes will generates in Category

            – HybrisHelp
            Nov 28 '18 at 13:47











          • @HybrisHelp I have a feeling it's not going to work, because the PKs in CSCategory table will be different from the PKs in Category table. Take note that when you specify a deployment table, you also specify a type code, and the type code is part of the PK. So, I think you're going to have to migrate everything, including records/references that depend on them.

            – geffchang
            Nov 28 '18 at 13:53













          • Yes I know the Pk would be different. But trying something to avoid full migration. let's see

            – HybrisHelp
            Nov 28 '18 at 14:06











          • @HybrisHelp Let me know how it goes. I'm curious. :)

            – geffchang
            Nov 28 '18 at 14:08











          • Unfortunately, is the only long way to go :) I had exported all data including dependencies and reImported it after data model changes.

            – HybrisHelp
            Mar 7 at 6:32











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53518355%2fremove-deployment-table-for-a-type%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I have done what you have suggested in our project.



          Since the records are already in Table_X, you would have to export the items of Type_X, remove the items of Type_X (which will remove them from Table_X), and reimport them as Type_Y. If there are other types dependent on them, you would have to consider them in the data migration as well.



          After that, it should be safe to remove the deployment tag, and to drop the database table. If necessary, you have have to remove the orphaned types via HAC as well.



          I can't think of another or better way of doing it.






          share|improve this answer
























          • What I am trying is, exported CSCategory data >removed deployment tag from code > update the system > then will try to reImport data let's me see what happen. I hope all 'CSCategor` atrributes will generates in Category

            – HybrisHelp
            Nov 28 '18 at 13:47











          • @HybrisHelp I have a feeling it's not going to work, because the PKs in CSCategory table will be different from the PKs in Category table. Take note that when you specify a deployment table, you also specify a type code, and the type code is part of the PK. So, I think you're going to have to migrate everything, including records/references that depend on them.

            – geffchang
            Nov 28 '18 at 13:53













          • Yes I know the Pk would be different. But trying something to avoid full migration. let's see

            – HybrisHelp
            Nov 28 '18 at 14:06











          • @HybrisHelp Let me know how it goes. I'm curious. :)

            – geffchang
            Nov 28 '18 at 14:08











          • Unfortunately, is the only long way to go :) I had exported all data including dependencies and reImported it after data model changes.

            – HybrisHelp
            Mar 7 at 6:32
















          0














          I have done what you have suggested in our project.



          Since the records are already in Table_X, you would have to export the items of Type_X, remove the items of Type_X (which will remove them from Table_X), and reimport them as Type_Y. If there are other types dependent on them, you would have to consider them in the data migration as well.



          After that, it should be safe to remove the deployment tag, and to drop the database table. If necessary, you have have to remove the orphaned types via HAC as well.



          I can't think of another or better way of doing it.






          share|improve this answer
























          • What I am trying is, exported CSCategory data >removed deployment tag from code > update the system > then will try to reImport data let's me see what happen. I hope all 'CSCategor` atrributes will generates in Category

            – HybrisHelp
            Nov 28 '18 at 13:47











          • @HybrisHelp I have a feeling it's not going to work, because the PKs in CSCategory table will be different from the PKs in Category table. Take note that when you specify a deployment table, you also specify a type code, and the type code is part of the PK. So, I think you're going to have to migrate everything, including records/references that depend on them.

            – geffchang
            Nov 28 '18 at 13:53













          • Yes I know the Pk would be different. But trying something to avoid full migration. let's see

            – HybrisHelp
            Nov 28 '18 at 14:06











          • @HybrisHelp Let me know how it goes. I'm curious. :)

            – geffchang
            Nov 28 '18 at 14:08











          • Unfortunately, is the only long way to go :) I had exported all data including dependencies and reImported it after data model changes.

            – HybrisHelp
            Mar 7 at 6:32














          0












          0








          0







          I have done what you have suggested in our project.



          Since the records are already in Table_X, you would have to export the items of Type_X, remove the items of Type_X (which will remove them from Table_X), and reimport them as Type_Y. If there are other types dependent on them, you would have to consider them in the data migration as well.



          After that, it should be safe to remove the deployment tag, and to drop the database table. If necessary, you have have to remove the orphaned types via HAC as well.



          I can't think of another or better way of doing it.






          share|improve this answer













          I have done what you have suggested in our project.



          Since the records are already in Table_X, you would have to export the items of Type_X, remove the items of Type_X (which will remove them from Table_X), and reimport them as Type_Y. If there are other types dependent on them, you would have to consider them in the data migration as well.



          After that, it should be safe to remove the deployment tag, and to drop the database table. If necessary, you have have to remove the orphaned types via HAC as well.



          I can't think of another or better way of doing it.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 28 '18 at 13:11









          geffchanggeffchang

          83311743




          83311743













          • What I am trying is, exported CSCategory data >removed deployment tag from code > update the system > then will try to reImport data let's me see what happen. I hope all 'CSCategor` atrributes will generates in Category

            – HybrisHelp
            Nov 28 '18 at 13:47











          • @HybrisHelp I have a feeling it's not going to work, because the PKs in CSCategory table will be different from the PKs in Category table. Take note that when you specify a deployment table, you also specify a type code, and the type code is part of the PK. So, I think you're going to have to migrate everything, including records/references that depend on them.

            – geffchang
            Nov 28 '18 at 13:53













          • Yes I know the Pk would be different. But trying something to avoid full migration. let's see

            – HybrisHelp
            Nov 28 '18 at 14:06











          • @HybrisHelp Let me know how it goes. I'm curious. :)

            – geffchang
            Nov 28 '18 at 14:08











          • Unfortunately, is the only long way to go :) I had exported all data including dependencies and reImported it after data model changes.

            – HybrisHelp
            Mar 7 at 6:32



















          • What I am trying is, exported CSCategory data >removed deployment tag from code > update the system > then will try to reImport data let's me see what happen. I hope all 'CSCategor` atrributes will generates in Category

            – HybrisHelp
            Nov 28 '18 at 13:47











          • @HybrisHelp I have a feeling it's not going to work, because the PKs in CSCategory table will be different from the PKs in Category table. Take note that when you specify a deployment table, you also specify a type code, and the type code is part of the PK. So, I think you're going to have to migrate everything, including records/references that depend on them.

            – geffchang
            Nov 28 '18 at 13:53













          • Yes I know the Pk would be different. But trying something to avoid full migration. let's see

            – HybrisHelp
            Nov 28 '18 at 14:06











          • @HybrisHelp Let me know how it goes. I'm curious. :)

            – geffchang
            Nov 28 '18 at 14:08











          • Unfortunately, is the only long way to go :) I had exported all data including dependencies and reImported it after data model changes.

            – HybrisHelp
            Mar 7 at 6:32

















          What I am trying is, exported CSCategory data >removed deployment tag from code > update the system > then will try to reImport data let's me see what happen. I hope all 'CSCategor` atrributes will generates in Category

          – HybrisHelp
          Nov 28 '18 at 13:47





          What I am trying is, exported CSCategory data >removed deployment tag from code > update the system > then will try to reImport data let's me see what happen. I hope all 'CSCategor` atrributes will generates in Category

          – HybrisHelp
          Nov 28 '18 at 13:47













          @HybrisHelp I have a feeling it's not going to work, because the PKs in CSCategory table will be different from the PKs in Category table. Take note that when you specify a deployment table, you also specify a type code, and the type code is part of the PK. So, I think you're going to have to migrate everything, including records/references that depend on them.

          – geffchang
          Nov 28 '18 at 13:53







          @HybrisHelp I have a feeling it's not going to work, because the PKs in CSCategory table will be different from the PKs in Category table. Take note that when you specify a deployment table, you also specify a type code, and the type code is part of the PK. So, I think you're going to have to migrate everything, including records/references that depend on them.

          – geffchang
          Nov 28 '18 at 13:53















          Yes I know the Pk would be different. But trying something to avoid full migration. let's see

          – HybrisHelp
          Nov 28 '18 at 14:06





          Yes I know the Pk would be different. But trying something to avoid full migration. let's see

          – HybrisHelp
          Nov 28 '18 at 14:06













          @HybrisHelp Let me know how it goes. I'm curious. :)

          – geffchang
          Nov 28 '18 at 14:08





          @HybrisHelp Let me know how it goes. I'm curious. :)

          – geffchang
          Nov 28 '18 at 14:08













          Unfortunately, is the only long way to go :) I had exported all data including dependencies and reImported it after data model changes.

          – HybrisHelp
          Mar 7 at 6:32





          Unfortunately, is the only long way to go :) I had exported all data including dependencies and reImported it after data model changes.

          – HybrisHelp
          Mar 7 at 6:32




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53518355%2fremove-deployment-table-for-a-type%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)