Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-6501

Refactor JPQL query for getNumberOfDevicesForLoginName

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None

      Underneath the Dashboard URL, there is this query invoked:

      https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/jpa/src/main/java/org/jboss/aerogear/unifiedpush/jpa/dao/impl/JPAInstallationDao.java#L198

      It uses sub-selects, which are not good, and can be (very) slow.

      The overall idea is to replace it with a proper join, like:

      select
          count(installation)
      from
          Installation installation, Variant t
      where
          installation.variant = t.variantID
          and t.developer = :developer
      

            Unassigned Unassigned
            mwessend@redhat.com Matthias Wessendorf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: