2 Replies Latest reply on Jul 5, 2019 10:10 AM by Lucas Nascimento

    Number of Attributes TSIM

    Lucas Nascimento
      Share This:

        • 1. Re: Number of Attributes TSIM
          Andy Scholebo

          Hi Lucas,

           

          Development conveyed that the value is taken from the cached GUI within the application so a SQL query to pull the same details will have some variance.

          The following query may not match the exact number of what you see in the GUI, but it might get you in the ballpark:
          runjava scripts.runsqli "select sum(tb2.instcnt*tb1.attrcnt) from (select motypeid,count(*) instcnt from item_cfg where parentmotypeid!=1 and mfd = 0 group by motypeid) tb2,(select motypeid,count(*) attrcnt from attribute_meta where attrtype = 4 group by motypeid ) tb1 where tb2.motypeid=tb1.motypeid"

           

          Regards,

           

          Andy

          • 2. Re: Number of Attributes TSIM
            Lucas Nascimento

            Andy,

             

            Very good. I ran the quey below and the value is pretty close. With this I will have the graphical view of the number of attributes to take actions of decrease and control before reaching the limit of the TSIM.

             

            select sum(tb2.instcnt*tb1.attrcnt) ATRIBUTOS_TSIM15

            from (select motypeid,count(*) instcnt

                  from owner.item_cfg

                  where parentmotypeid!=1

                  group by motypeid) tb2,

                  (select motypeid,count(*) attrcnt

                  from owner.attribute_meta

                  where attrtype = 4 group by motypeid ) tb1

            where tb2.motypeid=tb1.motypeid;

             

             

            ATRIBUTOS_TSIM15

            1493704