Uploaded image for project: 'MediaPortal 2'
  1. MediaPortal 2
  2. MP2-394

Entering audio section in MP2 Client executes same SQL query on MP2 server twice

    XMLWordPrintable

Details

    • Icon: Improvement/Rework Improvement/Rework
    • Resolution: No change required
    • Icon: Minor Minor
    • 2.1.1
    • 2.0.0-alpha.3
    • None
    • None

    Description

      <p>When enterin the audio section of MP2 Client to display all the available albums with the number of tracks in each album, exactly the same SQL query is executed twice on the MP2 Server side. This effectively doubles the time necessary to fetch the respective data from the database.</p><p>Not sure if this is intended behavior, but should be analyzed in more detail. The query is as follows:</p><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">SELECT</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; COUNT(</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; V.C</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">) C,</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; V.A0</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">FROM (</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; SELECT</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; DISTINCT T1.MEDIA_ITEM_ID C,</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; T0.ALBUM A0</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">FROM M_PROVIDERRESOURCE T1</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; INNER JOIN M_MEDIAITEM T2 ON T2.MEDIA_ITEM_ID = T1.MEDIA_ITEM_ID</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; INNER JOIN M_AUDIOITEM T0 ON T0.MEDIA_ITEM_ID = T1.MEDIA_ITEM_ID &nbsp;</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">WHERE</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; (</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; T1.SYSTEM_ID = @V0</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; OR T1.SYSTEM_ID = @V1</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">)</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">) V</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">GROUP BY</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; V.A0</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">-------------------------------------------------------</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">"V0" [String]: 'ef2d2144-c347-4db2-b7d2-3e634c6f7705'</div><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">"V1" [String]: 'f3feaa94-a92c-4ba1-b841-aa617dadefe9'</div>

      Attachments

        Activity

          People

            Unassigned Unassigned
            MJGraf MJGraf (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: