Opush
  1. Opush
  2. OP-247

Too long time spent on SQL when Sync request have changes

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Normal Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.1
    • Labels:
      None
    • Rank:
      7067

      Description

      Pre-conditions

      • Having a huge opush_sync_state table (like a real production syncing for a while)
      • Have the BREAKDOWN logger activated

      Reproduction steps

      1. As usera with opush, sync

      Current behavior

      1. NOK too much time spent on SQL (like 90%)
        16:49:34.163 [INFO ] {BREAKDOWN} [t620059/cSync/r620231/lschurr@linagora.com] REQUEST:23997 (SQL:20245, EMAIL:2266 (CASSANDRA:38, OTHER:6228
        ), CASSANDRA:11, OTHER:1475)

      Expected behavior

      1. OK no much time spent

      How to solve that

      Some indexes are missing:

      CREATE INDEX ON opush_sync_state (last_sync);
      CREATE INDEX ON opush_sync_state (collection_id);
      CREATE INDEX ON opush_sync_state (device_id);
      

        Issue Links

          Activity

          Thomas HILAIRE made changes -
          Field Original Value New Value
          Link This issue relates to OP-184 [ OP-184 ]
          Thomas HILAIRE made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Thomas HILAIRE made changes -
          Description h4. Pre-conditions
          - Having a huge opush_sync_state table (like a real production syncing for a while)
          - Have the BREAKDOWN logger activated

          h4. Reproduction steps
          # As _usera_ with opush, sync

          h4. Current behavior
          # {color:red}NOK{color} too much time spent on SQL (like 90%)
          {code}16:49:34.163 [INFO ] {BREAKDOWN} [t620059/cSync/r620231/lschurr@linagora.com] REQUEST:23997 (SQL:20245, EMAIL:2266 (CASSANDRA:38, OTHER:6228
          ), CASSANDRA:11, OTHER:1475){code}

          h4. Expected behavior
          # {color:green}OK{color} no much time spent

          h4. Additional informations
          Some indexes are missing:
          CREATE INDEX ON opush_sync_state (last_sync);
          CREATE INDEX ON opush_sync_state (collection_id);
          CREATE INDEX ON opush_sync_state (device_id);
          h4. Pre-conditions
          - Having a huge opush_sync_state table (like a real production syncing for a while)
          - Have the BREAKDOWN logger activated

          h4. Reproduction steps
          # As _usera_ with opush, sync

          h4. Current behavior
          # {color:red}NOK{color} too much time spent on SQL (like 90%)
          {code}16:49:34.163 [INFO ] {BREAKDOWN} [t620059/cSync/r620231/lschurr@linagora.com] REQUEST:23997 (SQL:20245, EMAIL:2266 (CASSANDRA:38, OTHER:6228
          ), CASSANDRA:11, OTHER:1475){code}

          h4. Expected behavior
          # {color:green}OK{color} no much time spent

          h4. How to solve that
          Some indexes are missing:
          {code}
          CREATE INDEX ON opush_sync_state (last_sync);
          CREATE INDEX ON opush_sync_state (collection_id);
          CREATE INDEX ON opush_sync_state (device_id);
          {code}
          Thomas HILAIRE made changes -
          Status In Progress [ 3 ] In Review [ 10001 ]
          Thomas HILAIRE made changes -
          Status In Review [ 10001 ] Ready To Merge [ 10002 ]
          Resolution Fixed [ 1 ]
          Thomas HILAIRE made changes -
          Status Ready To Merge [ 10002 ] Resolved [ 5 ]
          Thomas HILAIRE made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          karin made changes -
          Comment [ <a href="http://logistic-technology.us">Logistic Technology</a> | <br>
          <a href="http://fitbizlegal.us">Fit Biz Legal</a> | <br>
          <a href="http://quietlegal.us">Quite Legal</a> | <br>
          <a href="http://legaldatabases.us">Legal Databases</a> | <br>
          <a href="http://inboxlegal.us">Inbox Legal</a> | <br>
          <a href="http://legalprolink.us">Legal Prolink</a> | <br>
          <a href="http://legalcleaners.us">Legal Cleaner</a> | <br>
          <a href="http://legalecare.us">Legal Care</a> | <br>
          <a href="http://masterlegalusa.us">Master Legal USA</a> | <br>
          <a href="http://expressolegal.us">Express Legal</a> | <br>
          <a href="http://gricelegal.us">Grice Legal</a> | <br>
          <a href="http://saferlegal.us">Safer Legal</a> | <br>
          <a href="http://reducelegalfees.us">Reduce Legal Fees</a> | <br>
          <a href="http://fileslegal.us">Files Legal</a> | <br>
          <a href="http://uponlegal.us">Upon Legal</a> | <br>
          <a href="http://legal-accidents.us">Legal Accidents</a> | <br>
          <a href="http://heavylegal.us">Heavy Legal</a> | <br>
          <a href="http://starstarlegal.us">Star Star Legal</a> | <br>
          <a href="http://alexalegal.us">Alex Legal</a> | <br>
          <a href="http://legalformadvice.us">Legal Form Advice</a> | <br>
          <a href="http://legaltoplist.us">Legal Top List</a> | <br>
          <a href="http://sportmyday.us">Sport My Days</a> | <br>
          <a href="http://sportandmarket.us">Sport and Market</a> | <br>
          <a href="http://sportszingers.us">Sport Zinger</a> | <br>
          <a href="http://ks-motorsports.us">Motor Sports</a> | <br>
          <a href="http://uclasportsfans.us">Sports Fans</a> | <br>
          <a href="http://tryoutsport.us">Tryout Sport</a> | <br>
          <a href="http://ledsportswear.us">Led Sport Wear</a> | <br>
          <a href="http://intsportnews.us">Sport News</a> | <br>
          <a href="http://sportsingsports.us">Sporting Sport</a> | <br>
          <a href="http://sportlinecars.us">Sportline Cars</a> | <br>
          <a href="http://us24sports.us">Us 24 Sports</a> | <br>
          <a href="http://eday-sports.us">Eday Sport</a> | <br>
          <a href="http://esportereplay.us">Sport Replay</a> | <br>
          <a href="http://gjsportsadvice.us">Sport Advice</a> | <br>
          <a href="http://free-sports-now.us">Free Sport Now</a> | <br>
          <a href="http://hotdealsport.us">Hot Deal Sport</a> | <br>
          <a href="http://gotsportment.us">Got Sportment</a> | <br>
          <a href="http://oriental-sport.us">Oriental Sport</a> | <br>
          <a href="http://esportsfunds.us">Sports Funds</a> | <br>
          <a href="http://bcfsporthorses.us">Sport Horses</a> | <br>
          <a href="http://realwoodhomes.us">Real Wood Home</a> | <br>
          <a href="http://ahousehome.us">A House Home</a> | <br>
          <a href="http://ownlocalhomes.us">Own Local Homes</a> | <br>
          <a href="http://ibuyhomes4you.us">I Buy Home for You</a> | <br>
          <a href="http://softhome100.us">Soft Home</a> | <br>
          <a href="http://ilovehomeroom.us">I Love Home Room</a> | <br>
          <a href="http://sprinterhomes.us">Sprinter Home</a> | <br>
          <a href="http://homelandstyle.us">Home Land Style</a> | <br>
          <a href="http://homeadvisotr.us">Home Advisor</a> | <br>
          <a href="http://purewater4home.us">Pure Water for Home</a> | <br>
          <a href="http://flahomecare.us">Home Care</a> | <br>
          <a href="http://mydailyhomedeco.us">My Daily Home</a> | <br>
          <a href="http://homedesign88.us">Home Design 88</a> | <br>
          <a href="http://homhomeaway.us">Home Away</a> | <br>
          <a href="http://sweet-homes.us">Sweet Homes</a> | <br>
          <a href="http://dreamhome365.us">Dream Home 365</a> | <br>
          <a href="http://bonathome.us">Bonat Home</a> | <br>
          <a href="http://nicehomedecore.us">Nice Home Decore</a> | <br>
          <a href="http://hunthomeforsale.us">Hunt Home for Sale</a> | <br>
          <a href="http://7dayhomesellers.us">7 day Home Sellers</a> | <br>
          <a href="http://www.healthreign.us">Health Reign</a> | <br>
          <a href="http://www.ripahealth.us">Ripa Health</a> | <br>
          <a href="http://www.health-4-u.us">Health for You</a> | <br>
          <a href="http://www.greathealth2u.us">Great Health to You</a> | <br>
          <a href="http://www.healthykeem.us">Healthy Keem</a> | <br>
          <a href="http://www.mhealthinsiders.us">Health Insider</a> | <br>
          <a href="http://www.goodhealthwitch.us">Good Health </a> | <br>
          <a href="http://www.healthyfitlines.us">Healthy Fit Lines</a> | <br>
          <a href="http://www.healthychirp.us">Healty Chrip</a> | <br>
          <a href="http://www.healthmina.us">Health Mina</a> | <br>
          <a href="http://www.healthascend.us">Health a Scend</a> | <br>
          <a href="http://www.health-chirp.us">Health Chirp</a> | <br>
          <a href="http://www.lifefithealthy.us">Life Fit Healthy</a> | <br>
          <a href="http://www.bighealthtimes.us">Big Health Times</a> | <br>
          <a href="http://www.arogalifehealth.us">Life Health</a> | <br>
          <a href="http://www.wonhealthy.us">Won Healthy</a> | <br>
          <a href="http://www.hairhealthguide.us">Hair Health Guide</a> | <br>
          <a href="http://www.healthypurebody.us">Healty Pure Body</a> | <br>
          <a href="http://www.healthnewsbot.us">Health News Bot</a> | <br>
          <a href="http://www.healthnutbeauty.us">Healthy Nut Beauty</a> | <br>
          <a href="http://www.soulbusinessiq.us">Soul Business</a> | <br>
          <a href="http://www.1andonebusiness.us">1 & 1 Business</a> | <br>
          <a href="http://www.businessacount.us">Business Account</a> | <br>
          <a href="http://www.concisebusiness.us">Concise Business</a> | <br>
          <a href="http://www.businessairman.us">Business Airman</a> | <br>
          <a href="http://www.zmultibusiness.us">Multi Business</a> | <br>
          <a href="http://www.exporbusiness.us">Expore Business</a> | <br>
          <a href="http://www.9thbusiness.us">9th Business</a> | <br>
          <a href="http://www.business-matrix.us">Business Matrix</a> | <br>
          <a href="http://www.facing-business.us">Facing Business</a> | <br>
          <a href="http://www.excelbusiness.us">excel Business</a> | <br>
          <a href="http://www.1idea2business.us">Idea to Business</a> | <br>
          <a href="http://www.ebusinessz.us">E Business</a> | <br>
          <a href="http://www.buddymebusiness.us">Buddy me Business</a> | <br>
          <a href="http://www.businesshumans.us">Business Humans</a> | <br>
          <a href="http://www.business24hours.us">Business 24 Hour</a> | <br>
          <a href="http://www.upstartbusiness.us">Up Start Business</a> | <br>
          <a href="http://www.mybusinessocial.us">my Business Socail</a> | <br>
          <a href="http://www.hrbusinessboost.us">Business Boost</a> | <br>
          ]

            People

            • Assignee:
              Thomas HILAIRE
              Reporter:
              Thomas HILAIRE
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: