Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-1586

Remove AccountShadowType

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2 (Crius)
    • Fix Version/s: 2.2.1
    • Component/s: Infra, Repository
    • Labels:
      None

      Description

      Queries like this:

      select 
          this_.id as id1_2_,
          this_.oid as oid1_2_,
          this_1_.description as descript1_2_2_,
          this_1_.extId as extId2_2_,
          this_1_.extOid as extOid2_2_,
          this_1_.extType as extType2_2_,
          this_1_.version as version2_2_,
          this_.administrativeStatus as administ1_18_2_,
          this_.archiveTimestamp as archiveT2_18_2_,
          this_.disableTimestamp as disableT3_18_2_,
          this_.effectiveStatus as effectiv4_18_2_,
          this_.enableTimestamp as enableTi5_18_2_,
          this_.validFrom as validFrom18_2_,
          this_.validTo as validTo18_2_,
          this_.validityChangeTimestamp as validity8_18_2_,
          this_.validityStatus as validity9_18_2_,
          this_.assigned as assigned18_2_,
          this_.attemptNumber as attempt11_18_2_,
          this_.attrId as attrId18_2_,
          this_.attrOid as attrOid18_2_,
          this_.attrType as attrType18_2_,
          this_.dead as dead18_2_,
          this_.exist as exist18_2_,
          this_.failedOperationType as failedO14_18_2_,
          this_.intent as intent18_2_,
          this_.iteration as iteration18_2_,
          this_.iterationToken as iterati17_18_2_,
          this_.kind as kind18_2_,
          this_.name_norm as name19_18_2_,
          this_.name_orig as name20_18_2_,
          this_.objectChange as objectC21_18_2_,
          this_.class_namespace as class22_18_2_,
          this_.class_localPart as class23_18_2_,
          this_.resourceRef_description as resourc24_18_2_,
          this_.resourceRef_filter as resourc25_18_2_,
          this_.resourceRef_relationLocalPart as resourc26_18_2_,
          this_.resourceRef_relationNamespace as resourc27_18_2_,
          this_.resourceRef_targetOid as resourc28_18_2_,
          this_.resourceRef_type as resourc29_18_2_,
          this_.synchronizationSituation as synchro30_18_2_,
          this_.synchronizationTimestamp as synchro31_18_2_,
          this_3_.accountType as accountT1_19_2_,
          this_3_.allowedIdmAdminGuiAccess as allowedI2_19_2_,
          this_3_.passwordXml as password3_19_2_,
          case
              when this_3_.id is not null then 9
              when this_.id is not null then 8
          end as clazz_2_,
          ranycontai2_.owner_id as owner1_16_0_,
          ranycontai2_.owner_oid as owner2_16_0_,
          ranycontai2_.owner_type as owner3_16_0_,
          ranycontai3_.owner_id as owner1_16_1_,
          ranycontai3_.owner_oid as owner2_16_1_,
          ranycontai3_.owner_type as owner3_16_1_
      from
          m_shadow this_
              inner join
          m_object this_1_ ON this_.id = this_1_.id and this_.oid = this_1_.oid
              inner join
          m_container this_2_ ON this_.id = this_2_.id and this_.oid = this_2_.oid
              left outer join
          m_account_shadow this_3_ ON this_.id = this_3_.id and this_.oid = this_3_.oid
              left outer join
          m_any ranycontai2_ ON this_1_.extId = ranycontai2_.owner_id and this_1_.extOid = ranycontai2_.owner_oid and this_1_.extType = ranycontai2_.owner_type
              left outer join
          m_any ranycontai3_ ON this_.attrId = ranycontai3_.owner_id and this_.attrOid = ranycontai3_.owner_oid and this_.attrType = ranycontai3_.owner_type
      order by this_.name_orig asc
      limit 10;
      

      takes 13s, without account shadow table join 4ms. In were db 500k shadows.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lazyman Viliam Repan
              Reporter:
              lazyman Viliam Repan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: