Guys, I do not care about the performance as indicated in the initial ticket much as of right now.
The issue is impacting our ability to save Custom Fields (People post type - position, sorting). They go blank, if they exist or never saved. We are getting killed queries referring the Toolset plugin and the issue disappears when we remove half of the existing posts which are interconnected.
The error is KILLED QUERY (31478 characters long generated in /nas/content/live/ceidotorgprod/wp-content/plugins/types/vendor/toolset/types/embedded/classes/loader.php:85): SELECT * FROM wp_postmeta WHERE post_id IN (96560,95628,95489,95486,95686,95462,95690,95105,95694,95013,94712,94660,95708,94412,94403,94520,95735,94232,93601,93298,93129,93152,93091,93059,93001,92953,92922,92982,92941,92906,92901,92933,92903,92880,92972,92892,92949,92857,93062,95740,95759,92465,92476,92456,92436,92378,92345,95764,92181,92160,91979,91460,92059,91469,91466,91212,91161,91097,91062,91040,91043,91024,91036,91041,91025,91045,91046,91039,91167,91150,91285,90806,91191,90701,91185,90442,90335,90307,90344,90455,90283,90799,90269,90144,90452,90362,90121,90350,91595,89050,89031,88978,89067,88927,88965,88794,88776,88727,88764,88479,88638,88619,88195,88204,88144,84824,84794,84638,84732,88921,84635,84394,84428,84491,84296,84771,84313,84308,84307,88919,84716,76047,60270,84632,60246,76040,60228,76034,60209,60203,60195,60198,60183,60177,60173,60167,84629,60133,75960,83466,60095,60098,60092,84626,60073,60067,75950,60055,75941,60045,83460,60040,60033,60009,84623,59990,84620,59996,59969,59963,59960,59954,75892,59929,59890,59896,59884,59878,75848,75846,75845,75842,75841,83407,59854,59839,75833,75831,75827,75826,59825,84617,83404,83400,83398,75821,83390,83386,83383,83375,83363,83361,83359,83357,83354,59819,59801,59807,75815,75813,83348,59777,75807,83332,75805,75801,59728,84606,59700,59691,59685,59666,59654,59648,59634,75774,75773,59605,59602,84603,59576,59567,84589,75751,59549,75742,75741,59537,75739,59506,59509,59485,75729,59456,59422,59425,75711,59401,59374,59371,59363,59334,75695,59302,84584,59311,75690,84581,59278,59248,59213,59178,75658,59163,59152,59150,84573,75632,75614,75613,84554,59139,59136,59088,59078,59066,59051,59037,59035,75584,59013,59005,59001,58985,58983,75551,58978,58974,75544,58944,58938,58933,75521,58928,58918,75503,58894,75500,75499,75492,58864,58868,58862,75485,75484,58860,83116,58855,58850,83111,75478,58846,58844,58833,75458,75456,75454,58814,58757,58737,58728,58715,58713,58705,75417,58684,58660,58646,58624,58620,58618,75389,75385,75381,75379,58607,58600,58583,58575,58562,75332,75328,58548,58546,58544,75301,75300,75299,75297,58529,75287,58507,75274,58478,58473,75261,58463,58458,75254,58448,58446,58422,58428,58424,58412,75226,58396,75224,75222,75218,75207,58366,75198,75197,75196,75194,58338,75190,75189,58333,58323,75179,58298,58293,58284,58278,58272,58259,75149,58231,58229,58214,75147,82977,82972,82969,82965,82949,82945,82943,82935,82922,82919,58205,58199,82917,82914,82908,58187,58185,58171,75153,58177,58167,75132,58150,58148,58141,75100,58120,75090,58112,58087,58041,58028,58017,58011,57999,75042,57980,75035,75032,57964,75017,57941,57932,57930,57923,57913,57895,57879,74983,74981,57860,74978,74976,57856,57836,74966,57834,57832,57826,74951,74948,57810,57801,74934,74930,74927,57772,74921,74920,74919,74916,74915,57763,74914,74908,74907,74906,57753,74905,57748,74901,74899,82764,57736,57732,57725,57727,57723,74887,57715,74880,57689,74875,57684,74870,74865,74849,74845,57663,74826,57633,74816,74815,74805,57602,57596,74796,74794,74790,74789,74783,74768,74766,82735,57568,74754,57548,74745,74743,57535,57537,82730,74728,74714,57517,74711,74710,74709,74696,74692,74685,57507,57509,57501,74675,57483,57471,74653,57456,57452,74635,74629,57443,74627,74624,74615,74610,82699,74606,74604,57430,74600,74599,74598,74596,74595,57410,74561,74553,57361,57364,74540,74538,57334,57311,57304,74503,57273,74485,57246,57239,57232,74480,74465,74463,57214,57172,57156,74424,74420,74417,74412,57139,57134,57115,57113,74378,82559,57094,57088,74369,74365,74362,57044,74353,74351,74341,57032,57030,74335,74332,74321,74319,57009,74309,74302,82535,56992,74298,56989,56974,74293,56960,74287,56953,56951,74283,74281,74280,74279,74278,56937,56934,74273,74271,74269,74268,74259,74253,56908,74248,74246,74245,74243,74422,74239,74238,56895,56884,56871,56873,56866,74233,56860,74232,74415,74228,74227,74226,74224,56845,56841,74219,74218,74214,74212,56826,56822,74210,74209,56809,56805,74197,56803,74193,74189,56796,56794,56792,56785,56776,56765,74161,74160,74159,56759,56751,56749,74149,56745,56743,74142,74140,82466,56737,82463,82460,56726,74124,74123,74120,74117,56711,56697,74088,74043,56586,74034,74033,74031,74030,74028,74027,74026,74023,74013,74012,74011,74010,74006,73994,73993,73992,73988,73982,73961,73960,73959,73958,73957,73953,73952,56531,73933,73931,73930,73927,73924,73923,73922,73920,73919,73918,73916,73911,73910,73909,73906,73901,73888,73887,56494,73883,73882,73881,73880,73879,73878,73876,73873,73865,73864,73863,73857,56480,56472,73856,73855,56465,56461,73848,73847,73846,73841,73830,56434,73825,73819,73818,73807,73805,73804,56406,73803,73802,73800,73799,56392,73791,73787,73780,73777,73773,56370,73768,73767,73765,73757,56342,73751,73750,73748,73745,73744,73743,73742,74014,56339,56334,73736,56316,73732,56309,73729,56305,73721,56296,73689,56260,73681,73678,73669,73668,73663,73662,73659,73656,56242,56240,56234,73651,73638,73637,56215,73621,73618,73616,73605,56197,73584,56179,82307,73580,73576,73564,56138,73537,73533,88773,73527,73526,73525,73521,73520,73519,73518,73516,82284,56130,56127,73514,56125,56118,56116,73507,56110,56105,73495,73492,73476,73464,82264,73453,82257,73441,73440,73437,56039,73425,82252,56017,73412,73407,73402,73398,73393,73373,55989,73363,73362,55979,73359,73352,55963,73345,55961,82209,55959,73334,73322,73318,55938,73301,55926,73289,55897,73286,55894,55892,55891,55890,73273,55888,73261,55876,73253,73248,73246,73241,73239,55850,73229,55848,73217,55830,73214,55829,73203,73202,73191,73185,73178,73174,55791,55789,73173,73171,55787,73167,55784,55782,73162,73161,73160,73159,73158,73152,73151,73149,73148,73147,73146,73145,73144,73141,55774,73139,55769,55766,55753,55752,73108,73097,73096,73093,73090,73089,73086,55738,73085,55729,55726,82165,73074,82145,73069,73067,73064,73058,73056,73053,73049,73048,73047,73041,73039,55687,55672,73009,72994,72991,55663,72986,72982,55657,72968,72961,55639,72959,55620,72918,55592,55591,55567,55552,55544,55543,72836,72837,55533,55532,55527,72809,72806,55501,72796,55483,72767,72773,72782,72787,82039,55481,72770,72774,72766,55478,55476,55469,55467,55452,72746,55449,82018,72731,72739,55427,55423,72723,55421,55415,55404,72712,72699,72700,55392,55390,55385,72690,72677,72678,72679,55357,72668,55353,55346,55344,72660,81994,72644,55321,55317,55314,72637,72638,72642,72669,72620,72622,55284,72623,55280,55276,81984,72607,55254,55253,72595,72598,55245,72593,55236,72586,55223,55221,55216,72576,55213,72577,55202,72570,72571,55192,72566,55186,55181,55171,72557,72558,72560,72561,81965,72554,55166,55146,72548,72545,72546,70539,70526,70529,55138,55137,70530,55135,55132,70527,67657,64692,55131,55128,70519,55122,55120,81954,70511,55106,70507,70506,72538,70505,70494,55095,70492,81902,55070,70490,72643,70464,70467,55059,70457,70462,55057,55054,70451,70454,70455,70456,55050,70447,70449,70450,70452,55049,55047,70443,70445,70446,55042,70440,70441,70442,55041,70437,55036,55034,70436,55029,70435,70433,70427,55022,54998,70429,54992,54990,70424,70413,70415,54960,54950,54949,70403,54945,54942,70402,70400,70397,70396,70387,70395,54923,70385,54921,54913,54909,54906,70371,70365,70372,54895,54886,54881,54879,70355,54867,54860,70347,54853,54852,54845,54844,70332,54835,72496,54829,54824,54802,54797,54793,54788,54780,54778,54773,54768,70301,70286,70287,54754,54748,70285,70278,54742,70267,70270,54741,54718,54707,54709,70251,70252,54689,70236,54676,70231,54674,54665,70221,70222,54654,70213,54648,54644,54637,54635,70204,70205,54628,54632,72457,81805,54597,70183,54591,54588,70181,54572,54567,54565,54564,70166,54546,54539,54537,70165,54531,54526,70157,54515,70145,81790,54503,54502,70130,72441,54472,54469,70111,54458,54444,54442,70104,54440,54438,54434,70094,70248,54410,54406,70074,70066,54397,54395,54394,70049,54381,70045,70043,70024,70036,54378,54371,70027,54363,70002,70004,54353,54343,54342,69984,69982,69990,69993,54338,81743,81738,81726,81720,81713,81700,81684,81677,81669,81657,69961,69962,69964,69967,69972,69974,69975,69976,69979,
Please try running the edit of the People profile with editing the custom fields on your side and you should see the error.
Looking forward to hearing from you.