Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22670

Slow Query on Mysql with particioned database

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • None
    • None
    • None

      I configured a new Zabbix in version 6.0.14, with Mysql 8.0.32 with particioned database on Ubuntu 22.04.2.

      The enviroment is right now with 677 hosts, 39204 itens with a 204.49 new values and i noticed that sometimes it takes a long time to load the frontend and when i see the logs it shows slow querys like this:

      1634524:20230413:110836.427 slow query: 3.097236 sec, "insert into history (itemid,clock,ns,value) values (23266,1681394866,52539332,0),(23268,1681394868,61385124,0.11846336097478423),(23628,1681394868,61624364,0),(25667,1681394867,57003131,0.82491582491582494),(25668,1681394868,61450695,0.095473435920476246),(44709,1681394865,909438573,0),(44710,1681394865,909438573,0.14733333333333334),(44712,1681394866,238060153,0),(44713,1681394866,238060153,0.061566666666666665),(44715,1681394867,940707291,0),(44716,1681394867,940707291,0.051800000000000006),(44889,1681394865,909438573,0),(44890,1681394865,909438573,0.04186666666666667),(44892,1681394866,238060153,0),(44893,1681394866,238060153,0.10030000000000001),(44895,1681394867,940707291,0),(44896,1681394867,940707291,0.091700000000000004),(44898,1681394868,76499939,0),(44899,1681394868,76499939,0.093200000000000005),(45069,1681394865,909438573,0),(45070,1681394865,909438573,0.00349),(45075,1681394867,940707291,0),(45076,1681394867,940707291,0.0044699999999999991),(47325,1681394865,909438573,0),(47326,1681394865,909438573,0.0015566666666666665),(47328,1681394866,238060153,0),(47329,1681394866,238060153,0.0013733333333333334),(47331,1681394867,940707291,0),(47332,1681394867,940707291,0.0014533333333333334),(47334,1681394868,406762994,0),(47335,1681394868,406762994,0.00039599999999999992),(47505,1681394865,909438573,0),(47506,1681394865,909438573,0.00095333333333333338),(47508,1681394866,238060153,0),(47509,1681394866,238060153,0.023933333333333334),(47511,1681394867,940707291,0),(47512,1681394867,940707291,0.0076366666666666666),(47688,1681394866,238060153,0),(47689,1681394866,238060153,0.0057966666666666661),(47691,1681394867,940707291,0),(47692,1681394867,940707291,0.0058899999999999994),(47694,1681394868,76499939,0),(47695,1681394868,76499939,0.0045166666666666662),(47865,1681394865,909438573,0),(47866,1681394865,909438573,0.0053400000000000001),(47868,1681394866,238060153,0),(47869,1681394866,238060153,0.0061066666666666665),(47871,1681394867,940707291,0),(47872,1681394867,940707291,0.008313333333333334),(47874,1681394868,76499939,0),(47875,1681394868,76499939,0.0093466666666666663),(48048,1681394866,238060153,0),(48049,1681394866,238060153,0.0030000000000000005),(48051,1681394867,405681542,0),(48052,1681394867,405681542,0.0017266666666666665),(48054,1681394868,76499939,0),(48055,1681394868,76499939,0.0026466666666666665),(48225,1681394865,909438573,0),(48226,1681394865,909438573,0.00039500000000000001),(48228,1681394866,238060153,0),(48229,1681394866,238060153,0.0081433333333333323),(48231,1681394867,940707291,0),(48232,1681394867,940707291,0.0022400000000000002),(48234,1681394868,76499939,0),(48235,1681394868,76499939,0.0022966666666666669),(50388,1681394868,61294206,37.860107421875),(51225,1681394866,9449654,1),(51285,1681394866,9446790,4),(51346,1681394866,285112041,-92),(51347,1681394867,356189459,-70),(51706,1681394866,374428188,-91),(51707,1681394867,362677812,-74),(51935,1681394865,909438573,0),(51936,1681394865,909438573,0.0041199999999999995),(51965,1681394866,238060153,0),(51966,1681394866,238060153,0.0072566666666666656),(51995,1681394867,940707291,0),(51996,1681394867,940707291,0.003836666666666667),(52245,1681394866,20440592,1),(52965,1681394866,27668835,2),(53025,1681394866,26914246,0),(53085,1681394866,41800948,1),(53145,1681394866,42994745,0),(53205,1681394866,50511304,0),(53265,1681394866,53207096,0),(53325,1681394866,81190901,3),(55787,1681394867,418045286,-96),(55967,1681394867,479589508,-90),(80305,1681394867,21548878,16),(80306,1681394867,21548878,15),(80307,1681394867,21548878,16),(80308,1681394867,21548878,-1),(80309,1681394867,21548878,-1),(99483,1681394867,790028439,12),(99484,1681394867,421728487,15),(99485,1681394867,790028439,12),(99486,1681394867,790028439,3),(99487,1681394867,790028439,2),(99488,1681394867,790028439,-1),(99489,1681394867,790028439,-1),(101903,1681394865,946455811,18),(101904,1681394865,946455811,16),(101905,1681394865,946455811,13),(101906,1681394865,946455811,6),(101907,1681394865,946455811,-1),(107504,1681394865,813854902,8),(107506,1681394865,813854902,14),(107510,1681394865,813854902,-1),(112567,1681394865,909438573,0),(112568,1681394865,909438573,0.050766666666666661),(112570,1681394866,238060153,0),(112571,1681394866,238060153,0.026633333333333332),(112573,1681394867,940707291,0),(112574,1681394867,940707291,0.036533333333333334),(112576,1681394868,76499939,0),(112577,1681394868,76499939,0.032399999999999998),(125927,1681394865,937603337,13.700000000000001),(125928,1681394868,447200151,13.800000000000001),(125929,1681394867,358144873,24.800000000000001),(125930,1681394868,481172647,13.300000000000001),(131402,1681394865,909438573,0),(131403,1681394865,909438573,0.0056499999999999996),(131536,1681394866,238060153,0),(131537,1681394866,238060153,0.0047533333333333342),(131603,1681394867,940707291,0),(131604,1681394867,940707291,0.010963333333333334),(131670,1681394868,76499939,0),(131671,1681394868,76499939,0.0052033333333333332),(131688,1681394868,60844935,43.2861328125),(132827,1681394867,56951658,15.42023689516129),(133511,1681394865,937603337,0),(133512,1681394865,937603337,0),(133513,1681394865,937603337,2),(133514,1681394865,937603337,1),(133651,1681394867,358144873,8),(133652,1681394867,358144873,6),(133749,1681394868,481172647,6),(133785,1681394865,922559556,3),(133786,1681394866,180670490,16),(133787,1681394867,344446043,17),(133788,1681394868,451859390,9),(134265,1681394865,926216993,9),(134266,1681394866,181241153,13),(134267,1681394867,56782112,29.635721247563353),(134385,1681394865,930978502,9),(134386,1681394866,183072068,9),(134387,1681394867,345807686,6),(134388,1681394868,460318044,11),(135286,1681394866,199887747,48),(135287,1681394867,57213828,39.73388671875),(136665,1681394866,179004833,24.300000000000001),(137678,1681394867,405681542,0),(137679,1681394867,405681542,0.0042733333333333338);
      "
      
      1634525:20230413:110845.556 slow query: 9.198601 sec, "insert into history_uint (itemid,clock,ns,value) values (28534,1681394854,6398399,0),(44672,1681394853,776291521,1),(44684,1681394857,825672794,1),(44687,1681394858,827232797,1),(44690,1681394859,852972989,1),(44693,1681394860,880145108,1),(44696,1681394861,894820147,1),(44699,1681394862,19519249,1),(44852,1681394853,776291521,1),(44855,1681394854,654715154,1),(44858,1681394855,804908690,1),(44861,1681394856,814614475,1),(44864,1681394857,825672794,1),(44867,1681394858,827232797,1),(44870,1681394859,852972989,1),(44876,1681394861,894820147,1),(44879,1681394862,19519249,1),(45032,1681394853,776291521,1),(45041,1681394856,814614475,1),(45044,1681394857,825672794,1),(45047,1681394858,827232797,1),(45050,1681394859,852972989,1),(45053,1681394860,880145108,1),(45059,1681394862,19519249,1),(45453,1681394854,5147239,1),(45771,1681394844,192425633,0),(45791,1681394844,192425633,139485984),(45804,1681394844,404735038,0),(45810,1681394844,404735038,3349354032),(46015,1681394844,192425633,6999605256),(46049,1681394844,404735038,0),(47288,1681394853,776291521,1),(47291,1681394854,389391737,1),(47294,1681394855,804908690,1),(47297,1681394856,814614475,1),(47303,1681394858,391489624,1),(47306,1681394859,392264113,1),(47309,1681394860,880145108,1),(47312,1681394861,894820147,1),(47315,1681394862,19519249,1),(47468,1681394853,776291521,1),(47471,1681394854,654715154,1),(47474,1681394855,804908690,1),(47477,1681394856,814614475,1),(47480,1681394857,825672794,1),(47483,1681394858,827232797,1),(47489,1681394860,880145108,1),(47492,1681394861,894820147,1),(47495,1681394862,19519249,1),(47648,1681394853,776291521,1),(47651,1681394854,389391737,1),(47654,1681394855,804908690,1),(47657,1681394856,391005660,1),(47660,1681394857,825672794,1),(47663,1681394858,827232797,1),(47666,1681394859,852972989,1),(47669,1681394860,880145108,1),(47672,1681394861,894820147,1),(47675,1681394862,19519249,1),(47828,1681394853,776291521,1),(47831,1681394854,389391737,1),(47834,1681394855,804908690,1),(47837,1681394856,814614475,1),(47840,1681394857,825672794,1),(47843,1681394858,827232797,1),(47846,1681394859,852972989,1),(47849,1681394860,393434516,1),(47852,1681394861,894820147,1),(47855,1681394862,19519249,1),(48008,1681394853,776291521,1),(48014,1681394855,804908690,1),(48017,1681394856,814614475,1),(48020,1681394857,825672794,1),(48023,1681394858,827232797,1),(48026,1681394859,852972989,1),(48032,1681394861,894820147,1),(48035,1681394862,19519249,1),(48188,1681394853,776291521,1),(48197,1681394856,814614475,1),(48200,1681394857,825672794,1),(48206,1681394859,852972989,1),(48212,1681394861,894820147,1),(48215,1681394862,19519249,1),(48368,1681394853,776291521,1),(48371,1681394854,654715154,1),(48374,1681394855,804908690,1),(48377,1681394856,814614475,1),(48380,1681394857,825672794,1),(48383,1681394858,827232797,1),(48386,1681394859,852972989,1),(50089,1681394800,34836724,37515913),(50156,1681394801,39682134,0),(50212,1681394802,27696881,2159764),(50383,1681394775,132748618,14754135),(50436,1681394776,181973561,10957273),(50495,1681394777,44488040,1876875),(50501,1681394861,709575571,1),(50557,1681394857,705148298,1),(50613,1681394853,702670850,1),(50889,1681394799,19556412,19493866),(51071,1681394787,545445139,681946),(51127,1681394788,644174197,15711652),(51399,1681394856,879603325,63627264),(51401,1681394861,33157645,1),(51445,1681394853,443939054,0),(51446,1681394853,437473498,41508864),(51453,1681394853,443939054,5565),(51492,1681394858,900177418,1892352),(51493,1681394855,14512096,0),(51494,1681394855,14512096,43511808),(51495,1681394855,12873077,63488000),(51501,1681394858,900177418,5600),(51526,1681394855,804908690,1),(51538,1681394758,688244508,5409854),(51556,1681394856,814614475,1),(51568,1681394758,693027479,20010974),(51573,1681394853,460570366,63627264),(51575,1681394855,9424313,1),(51586,1681394857,825672794,1),(51598,1681394758,696569339,25113515),(51616,1681394858,827232797,1),(51628,1681394758,696780106,28585168),(51633,1681394853,464032008,63627264),(51635,1681394855,8920982,1),(51646,1681394859,852972989,1),(51658,1681394758,835716706,7942281),(51676,1681394860,880145108,1),(51688,1681394758,699022346,33425862),(51693,1681394853,468072730,63488000),(51695,1681394855,9191062,1),(51814,1681394861,894820147,1),(51844,1681394862,19519249,1),(52117,1681394857,480173391,5700),(52693,1681394791,117665217,0),(52897,1681394857,497025910,5330),(53373,1681394853,519206681,5625),(53499,1681394860,10760257,5500),(53553,1681394853,526956768,5635),(53861,1681394787,615657918,0),(54041,1681394861,360898541,5745),(54095,1681394855,635200310,5230),(54341,1681394838,625055929,19066880),(54355,1681394839,635661585,134217728),(54360,1681394840,649778773,134217728),(54372,1681394841,625979231,17760256),(54379,1681394843,673221111,16777216),(54885,1681394791,401596049,8992906),(54961,1681394853,776291521,1),(54991,1681394854,654715154,1),(55021,1681394855,804908690,1),(55051,1681394856,814614475,1),(55081,1681394857,825672794,1),(55111,1681394858,827232797,1),(55141,1681394859,852972989,1),(55898,1681394858,904894087,5640),(64161,1681394841,599086233,8335724544),(66808,1681394862,362810781,1),(66821,1681394862,362810781,1),(66823,1681394862,362810781,1),(66824,1681394862,362810781,1),(66830,1681394862,362810781,1),(66835,1681394862,362810781,2),(66836,1681394862,362810781,2),(66878,1681394862,362810781,4373504),(66886,1681394862,362810781,587648),(66893,1681394862,362810781,114768),(66894,1681394862,362810781,52056),(66901,1681394862,362810781,9226240),(66902,1681394862,362810781,0),(66913,1681394862,362810781,35177712),(66914,1681394862,362810781,60820160),(66916,1681394862,362810781,31233496)
      

      Don't really know how to debug it.

            zabbix.support Zabbix Support Team
            Ingrid_gearnoc Ingrid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: