【 TiDB 使用环境】生产环境
【 TiDB 版本】7.1.5
【遇到的问题:问题现象及影响】IN值比较多的情况下,查询会很慢
以下表为例:
CREATE TABLE `t_asset` (
`id` bigint(20) NOT NULL COMMENT '资产id',
`create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`deleted` bit(1) DEFAULT NULL COMMENT '删除状态 true 已删除 | false 未删除',
`modifier` varchar(255) DEFAULT NULL COMMENT '最后修改人',
`modify_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
`apply_date` datetime(6) DEFAULT NULL COMMENT '申请日期',
`asset_number` varchar(255) DEFAULT NULL COMMENT '资产编号/物料代码',
`booked_date` datetime(6) DEFAULT NULL COMMENT '入账时间',
`extend` varchar(255) DEFAULT NULL COMMENT '扩展字段',
`flow_no` varchar(255) DEFAULT NULL COMMENT '流程单号',
`group_id` bigint(20) DEFAULT '0' COMMENT '分组id',
`line_id` varchar(255) DEFAULT NULL COMMENT '行id',
`model` varchar(255) DEFAULT NULL COMMENT '型号',
`name` varchar(255) DEFAULT NULL COMMENT '资产名称',
`owner` varchar(255) DEFAULT NULL COMMENT '所属人',
`parent_id` bigint(20) DEFAULT NULL COMMENT '父资产id',
`platform` varchar(255) DEFAULT NULL COMMENT '平台信息',
`purchase_date` datetime(6) DEFAULT NULL COMMENT '采购日期',
`serial_no` varchar(255) DEFAULT NULL COMMENT '序列号',
`source` varchar(255) DEFAULT NULL COMMENT '资源来源',
`extend_type` int(11) DEFAULT '6' COMMENT '资源类型扩展[设备(网络), 设备(非网络), 设备配套/模块, 服务器, 配件]',
`type` int(11) DEFAULT NULL COMMENT '类型',
`position_id` varchar(255) DEFAULT NULL COMMENT '位置id',
`status` int(11) DEFAULT '0' COMMENT '资源状态码',
`in_pool_flag` bit(1) DEFAULT NULL COMMENT '资源池标记位',
`support_login` int(11) DEFAULT '2' COMMENT '免密登录',
`msg` varchar(255) DEFAULT NULL COMMENT 'msg',
`fixed_time` datetime(6) DEFAULT NULL COMMENT '信息完善时间',
`confirm_status` int(11) DEFAULT '0' COMMENT '盘点状态:在用;闲置;损坏;遗失;已验收;未验收',
`fixed` tinyint(1) DEFAULT '0' COMMENT '信息完善标记位',
`extend_type_snapshot` int(11) DEFAULT NULL,
`product_id` bigint(20) DEFAULT NULL COMMENT ' 产品分类id',
PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,
KEY `t_asset_owner_IDX` (`owner`),
KEY `t_asset_parent_id_IDX` (`parent_id`),
KEY `IDX8dgrl9ohhkhqbu7q9ak8o66p8` (`group_id`),
KEY `IDXkjd8t40esch6v61f15e3xs7wa` (`fixed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
做如下查询:
SELECT *
FROM t_asset a
WHERE a.id IN
# 挺长的,大概2000~4000多个id
(5407245, 4789312, 4790104, 4790090, 146919, 146991, 146800, 4790169, 4790758, 4789391, 4788565, 4788849, 4790606,
4788529, 5352812, 4790050, 4788988, 5411650, 4790510, 146828, 190720, 146850, 4789374, 4791460, 4790672, 4790092……)
AND a.group_id IN
(22099, 56611, 4825, 3570, 3571, 4984, 10591, 56429, 22145, 3631, 3572, 58375, 539908, 58819, 3544, 3574, 310, 3632, 5081, 4222, 5001, 3630, 3633, 3634, 3635)
AND a.deleted = 0;
表数据大概50万条不到。
这个表之前是在posgresql上的,现在迁到tidb上来。原先在postgresql上执行只需要150ms不到,postgresql的执行计划如下:
QUERY PLAN
Bitmap Heap Scan on asset a (cost=7081.80..7161.33 rows=11 width=421) (actual time=5.461..8.338 rows=892 loops=1)
Recheck Cond: ((resource_group_id = ANY ('{22099,56611,4825,3570,3571,4984,10591,56429,22145,3631,3572,58375,539908,58819,3544,3574,310,3632,5081,4222,5001,3630,3633,3634,3635}'::integer[])) AND (id = ANY ('{5407245,4789312,4790104,4790090,146919,146991,146800,4790169,4790758,4789391,4788565,4788849,4790606,4788529,5352812,4790050,4788988,5411650,4790510,146828,190720,146850,4789374,4791460,4790672,4790092,4791405,4788676,146995,4788504,4788705,4880236,4788471,4791425,4790323,4790394,146958,4789368,4788926,4791498,4790627,5394581,4791389,1179259,4788460,5404746,4789346,4788855,4789952,4790274,4788835,5364871,4788818,4791411,146941,4790961,332077,4788706,4788888,4790334,146961,146774,4790346,146784,4790374,4788839,4790155,4788791,146832,4790911,4788585,4790072,146883,146790,4788852,4789904,4790597,4789726,4788549,147020,4789293,4788713,257665,1296929,4790573,4788517,4788803,148956,5441969,4861681,218407,4791526,1070542,4791616,4788561,4861347,4789900,4790414,5379142,146844,4790224,4790223,4861750,4790352,4789705,5445209,4789338,4790383,146849,4788974,4790454,1285454,4789224,4790342,4790127,4790952,4789171,4790518,4790097,5352811,5448219,4789975,147051,4788817,5410058,4789740,4788711,4789305,142994,4788941,4790202,5375859,1345117,5364876,4788842,257662,5342016,1309728,190719,146996,5375856,146807,4790008,4790187,4788949,4790037,146965,4788771,4790226,5436859,148963,4790125,4789382,4788658,4788653,4790412,4788582,4791394,4790292,4789181,4790646,4789860,4791474,4791401,146796,4789568,4788515,5379724,4791519,4789742,4788488,4789826,4789311,4788458,4791504,4788552,4789002,4861357,4790076,1176643,4789995,4788857,4789763,4791412,4790422,147027,4790010,4788456,4789872,4788702,4789751,4789671,4788628,4882246,4789739,146928,4790466,148961,146823,4790405,5445364,4847857,146925,337612,4861740,87781,4790353,4790491,5418789,4788967,147026,4789759,1218483,5356143,4790069,4790337,5418352,4790201,4788556,4789142,4790399,4788975,4790135,4790197,5404744,4788760,148952,4790142,162300,147019,4790667,4791390,5445174,87830,4789365,4790022,4789935,4789692,4789940,5341047,4789393,4790106,4788660,4790042,5338735,4788905,4789173,4790269,4790253,5343937,4790958,4790277,5445369,4790227,4789566,5379713,146968,4788773,146913,4877887,4788589,5445360,4789936,402588,87853,4791470,146875,265106,4790062,4791534,4790641,4789351,146889,4791522,4789007,4788652,162301,4790164,146881,4788709,4790373,5365763,4790483,4788531,4790939,4791494,4790221,4788647,4790387,5378093,4788913,1189968,5341043,4788508,4791478,4790054,146870,5434365,4788827,4874194,4788509,4791492,147018,5448209,4788604,4788595,4790233,4788714,87641,559765,5415949,4788606,146940,4791507,4791415,5379717,4788557,5378571,4788903,4791496,4788861,4790099,4788829,150859,5445189,146888,4790551,4791418,4790619,4790936,257664,146777,4790325,4788683,4789204,4788475,5404749,146847,5422052,5402838,4788642,4879309,4791484,4788689,4881190,4788664,4790178,5355907,4788511,4789971,4789926,4791447,6000057,5448079,146783,386384,5436513,4791471,4790676,4790126,146838,4790077,4789767,146957,4788487,1197981,1264117,4790039,5395265,146896,4790389,4789982,4789386,4789758,1307879,4789380,4788512,5435652,4788993,4790212,4790392,4788629,4788482,5379737,4788911,4789159,4788726,5440147,5445205,4790023,1296928,5438479,5448428,4790651,4789834,4789768,4791509,4790110,4791403,4788490,5379728,4788631,5446824,1197979,4790948,4790087,146892,5396993,4791385,4790438,4788800,4788762,4788788,4787955,4788858,4790928,4790199,4788541,146782,4788806,4790391,4790372,4790452,4788922,4789292,5448434,4789735,4788562,4790230,4788862,146825,4790599,4791462,4789987,4790307,4790408,146951,5355904,4788848,4790133,5353899,549325,4789045,146962,5434369,4788747,146977,4789883,4788996,4789890,146871,4790536,141097,5444892,4789879,341314,4791479,537917,5353706,4791439,5396836,4788655,4788997,160341,4788994,4789849,4790607,146866,4788492,147037,4789116,4790029,4789341,5353484,5436515,4789810,4791452,4788598,147049,147056,5422059,5445171,5396153,4790572,1054282,4790504,5445363,5356141,87802,4788698,5379734,4791427,4789310,4788494,5445374,352168,4790249,4788992,4789863,274312,4789908,4791444,4791533,1307881,162264,4789852,4790427,4789851,4789244,4788866,4788686,5445172,4788527,4789186,4789010,4788914,146857,1195310,146974,4790063,4790052,4789149,146966,146922,1195309,4791414,4790013,4790457,4790542,4790358,4790289,4788753,5404745,146822,4788774,4790107,5418792,146813,4789564,146970,4789662,4789004,5443583,162265,4874547,5379722,272429,4790385,4789306,4790530,146934,4790605,147022,4790411,5422062,4789812,146867,4791535,4788891,4790492,5378569,4791456,4789563,4788884,4788581,4791627,4790418,4788924,5378573,4789958,4790649,4789931,146885,4788588,4788890,4790395,4790115,5449276,4791402,4790467,4791420,4788477,5434366,4789991,4788789,146839,4789677,4870670,192614,146835,4789815,4791457,5445375,591091,4788616,4791434,4790153,4789902,4790166,5403288,5403662,4785760,4789854,5408807,4788555,146938,146910,4788680,4789313,4788731,4788597,4789337,235319,4788641,147000,146770,4790481,5366452,4789099,426614,4789794,4788695,5445200,4791510,4789814,5445193,4789383,4789856,4789558,148964,4788540,4789911,5407468,5445183,4788727,4788921,146792,4842475,4788715,5445186,5445178,5434367,4791566,4789756,4790363,5422056,146924,4789270,4790271,4790935,4789279,4788659,4790531,461331,4788744,146877,4789333,4790000,4790938,4789732,5355905,4798776,341310,4790380,4791367,4788622,4789937,146900,4789388,4788983,4790521,4788876,4789962,4790557,146949,4788522,4789895,4790074,4788486,4795588,4791428,4788603,5448211,5441968,4790256,4789095,4789144,147057,4791398,4788764,4790237,4791621,6000058,4790137,4789223,4788624,4790673,4788833,4788787,4789792,4790632,5403661,4880753,4788476,4788584,146986,4789318,4790378,4788447,4790495,4789778,146798,274311,4790922,4790653,4789298,4788615,5445359,4788591,4790071,4788538,162276,4788986,5378568,4788770,4874722,5379130,4788919,147025,220287,5411698,4789207,147001,4788621,4789868,4791473,4789350,4788638,4788566,4788452,4789363,4791397,147060,4788732,959491,4789914,5438677,4790589,4788499,4788910,4788534,4789934,146929,4790080,4791453,259506,4788956,4789339,146936,4790351,5403287,4787892,4789302,4788619,4789139,4788682,1342603,4790299,4789317,4789779,4789000,4791503,4790279,147044,146971,5445372,4788454,160330,4789835,4790026,4790144,4790025,4788461,5434372,4790326,4790193,4791384,4788639,717317,4788981,147048,4790238,4788810,4790403,4788464,5352807,146893,5436856,146959,4790058,4790027,4788734,5379719,4789212,4790444,4790209,4790091,192613,4790043,4788505,146778,538840,4789985,4789299,4791570,4790335,4789831,4788671,227800,5418791,146830,146998,5445206,4788801,4788717,4789352,235322,4791416,4789100,4789725,4789347,4790640,5412662,4788880,4790517,4790035,4788915,4788625,148951,4791432,274313,146815,4788987,4791364,4789774,4788879,4788637,4788519,4788667,4791497,4788769,1307887,4788777,4791623,4790246,4790666,146826,4789253,4788593,4788743,4789263,4791449,4790170,4789802,4788932,1227557,4788640,4789180,5446647,4791378,4790540,4789888,146960,4788618,4791365,4790588,5379731,4788973,4790129,4790593,146955,4788518,4789964,4789770,146853,5367769,4789801,4788479,4789969,146840,220286,4790330,4789887,4790001,5415950,4789691,1307880,146906,4790327,337611,4791396,4791508,4791500,146846,4789954,4790377,4789711,4788814,265075,147055,4790268,4868879,4861480,549328,4789674,4790316,4788448,4790298,146891,87798,4791461,4789373,4791626,4789258,4789257,4788916,4789929,146953,4788927,4790348,4791438,5441967,4789753,87843,240970,4788580,4788530,4789884,4788896,4790648,5446635,4788826,4788634,4789927,4790088,4788972,4788586,5356140,4788807,4861759,146869,4791636,146921,4790675,5362656,146939,4790522,4789994,4788656,4788811,5376734,4788729,4790147,4790496,4788893,4861743,4790112,146898,4788575,4789191,190723,5417620,4789898,4788601,4789148,4790258,5364874,4791532,4789825,146947,146817,4788473,4788907,4870668,4788666,146795,265066,4790033,4789950,4790367,4791491,4790582,148965,4790533,1236616,4791373,147024,146912,1218481,4791464,4788898,4788558,4790509,4791371,4790349,5445357,4788507,5344155,4790251,4790464,4789261,5417598,4788526,4791446,4789869,146845,4790356,5438480,4791441,4544923,4790947,4791404,4789781,4790131,4789456,146909,5438481,5436855,5396996,146990,4789235,147004,4788480,4789709,4789277,4788883,4790471,146920,5434371,4788942,4788768,4791528,4788830,4788918,4788587,274337,1307888,5415948,4790620,4791482,235321,4790388,4789389,4788627,102573,4788963,4788785,4788906,146933,1283104,146894,5436512,4791399,4789167,4788881,5356506,4790511,4791628,4790569,4788543,4789784,4789008,341308,4788758,1174249,147046,147021,4788938,5366823,4791442,4789813,5343940,4791525,4789750,4791429,4790439,4788605,4790629,4788571,4791529,4790525,4789325,4789322,4790470,4790943,4790175,5441966,5422057,147012,4788971,4790286,4789122,5436514,4788736,5379738,4788947,4861599,4790248,461332,4789827,4791422,4788863,4791374,4788599,4788871,4788962,4790109,146855,4789976,5364859,4788720,4789121,146908,4788672,4788793,4790332,4789875,146969,4790390,4788510,5336180,4789381,4870537,4788679,142988,4790047,5376733,5418350,4790463,4791617,4790945,4790514,4790371,4789977,5438387,4790932,4790639,4790613,4790401,4789836,4791631,5445176,4788563,4788704,332078,5338734,146992,4791431,4791455,352169,148962,4788496,5436853,146915,4790145,4788953,5378567,146954,5444556,4788945,4790138,4790070,4789163,4788860,4789939,5445362,4788815,4790426,4790066,4788999,4870669,4790421,4791502,274310,5355906,4789924,4789957,5434368,4791530,147015,4790128,146901,4790575,4791391,4789218,4790538,4788936,4789997,147045,4788635,4790186,87812,4788766,142987,5378331,4788851,5448072,4788897,4791408,4790048,4790086,5378329,4788935,4788567,549324,272430,5352813,4789715,4788870,4790082,141096,4790450,4788899,4790031,4791362,4790181,5417358,146802,4788964,4789653,4790056,146997,146943,4788875,4791437,4789727,4789236,141098,4790266,240969,4788576,4790036,4861739,5436516,4791517,4788944,4791630,5378570,4788831,4788699,4788596,146848,4790441,4790552,4790278,4790293,147013,4788752,4790179,4788820,87806,549327,146797,147028,4791624,4788450,4788520,4788495,4788554,4790576,5403446,4788823,5445371,4789788,4789174,5379741,5379725,4791499,146987,4790163,4790304,4788608,4790283,4791370,4790956,146984,146890,4789878,146980,4788813,147007,148954,146904,4789919,4790154,146985,5448470,142989,5352816,4788900,5422061,4789846,4788502,4789110,4789101,4788937,4882250,5446649,146886,5338733,4788725,4788693,148957,259503,4788633,4789130,4788790,4790429,4789300,5445211,5379711,4874548,142992,147029,4789855,4789785,337610,146833,4788472,4788569,4788782,4790006,263177,4788613,4788533,5435651,4788677,4789892,146801,4790460,4790660,162275,4788712,146781,4788470,4788446,4791518,4788474,4789387,146982,4789203,4791380,5412661,146989,4788865,4788560,146994,5379131,146861,4788632,4791386,146834,4790313,4788645,4788763,4789990,4788718,4788484,4788748,4798810,4790435,4790407,4788895,147006,4791489,4790311,4791392,4790462,4789104,4788808,4789947,146821,4790440,5352810,4789009,4789920,4789011,4790664,147014,4789284,146923,4789775,4789274,4789205,4789336,4790656,4790486,4788943,147011,146843,5441865,4790942,4791459,4846590,4788491,146856,4788757,5353705,4789797,4791475,4789697,4790118,4789246,4790375,4790041,5445184,4790456,4791381,4788548,332076,146771,4789955,4791488,4789554,4789999,4790592,5407243,4788920,4788547,5438478,146979,4788779,4791480,4790318,146878,426613,4788525,4790105,4789737,4788501,5445373,4788687,4790637,4789989,5364875,5445356,4788594,4790360,4788776,4788577,5445190,4788892,4788961,4788754,4791409,146819,1298754,4788572,6000056,146804,5445358,4789255,4788493,5448431,147023,4788908,4789696,549326,4790093,4789870,147034,341307,4788841,4791511,4788889,4790103,4789760,5338736,4790925,5448429,4788796,4789561,148953,4789745,4789800,4784178,551927,4790953,4791506,5404748,4788780,265108,4789046,4790519,394529,4789145,160339,4788516,147047,4789793,4790195,4788925,147002,4790565,1003447,4788802,146993,4790393,4790134,5353709,146858,4790512,259507,4789757,4880474,4790108,218408,4790059,4790586,4788929,5449277,4788724,5418353,4791505,4789143,160345,4789362,4789001,4790940,4791481,5379723,4788574,4790416,147039,4788730,4789791,4790954,4788648,146785,147061,1218482,4791445,4788878,4790100,4790381,4790236,4788498,4789882,4788928,5404070,4788524,4789327,4789790,4788489,5336162,4861738,5445177,4790083,4790306,4789330,4791372,4790384,4791419,4790578,1200655,4789202,4790776,4789273,4790650,4789820,717318,4790616,4791625,4791395,4788783,4788592,4789676,4789980,147043,4788564,4789786,5379720,4788954,4789769,4790120,4789891,4788684,146975,4788930,4790415,4789858,4789164,5404747,1042872,4788854,4789738,4789194,4788843,5336181,4791468,4788478,5435992,4790267,146862,4790379,146918,5448073,146794,4790628,4789843,4790030,4788607,1200653,4789998,4790064,4788600,4790004,4789864,5353707,4791383,4791424,4788685,5378572,5448074,4789182,5367012,5365764,148950,4788691,190724,4789125,4789323,4789105,4788609,4790568,4789993,4788602,4788933,4788716,4788840,4789268,4788469,4788965,4790767,265087,4789113,4788948,5438679,4790228,5418351,4790583,4790400,87837,4790404,4790321,4788797,146942,4790442,4788719,146818,4788979,4788872,5373275,5448430,5449275,146952,4790376,5341046,4789901,87805,4788654,5396859,4791477,4789909,4788657,4789560,146911,4788934,4788767,4789949,5353901,5422060,5375855,5442106,5418790,4544924,4788703,4788532,5379718,4788957,4789162,4790449,4789912,4789807,4790652,87001,5445188,4788694,106256,4788950,146983,4790173,4788612,146935,146851,5395266,146872,4788620,4861741,4790645,146956,4789910,147040,4791466,4791426,4790541,4790563,4790165,5407244,146808,5445212,4789348,146973,4791469,4788952,5378330,4790626,235320,160343,146945,4788528,4789818,4788453,4879319,4789111,4790158,4788537,5445213,5379715,4791410,1003485,4789859,4789885,4788741,4789755,4790272,4788765,4790345,4789003,5410059,4788859,146772,146927,4788846,274315,4788721,5356142,4790547,5434364,4788483,4790032,4790188,4789747,4789804,4788668,5378332,4789315,87795,4789842,5443944,4789334,4789320,4788816,4790119,4788735,4788786,5396997,5409573,4791406,4788959,5379732,4790122,146887,4788740,4789301,4788931,4790075,4789844,4791515,146776,588472,147008,160335,4789098,4791388,5444240,4789913,4788485,146773,4788614,146791,4789724,4789693,4790468,4791487,4788756,4788459,4789871,257667,210898,146836,4788523,4791377,4790102,4790564,4788497,146779,4790240,4789840,4790055,4788795,4789953,4789114,4790194,142991,4790366,147017,148949,4791485,4789847,717108,4789326,4788521,4788465,4790244,146816,146926,4788578,4790553,5422058,5445185,4791524,5353704,5360469,4788799,4789734,4790590,4861479,4790079,5434363,1174248,4790101,146930,4790016,147053,4789723,5445182,4788970,4788805,4790638,147035,4790610,4789367,147058,4788902,4790291,146905,4791366,5438678,4788982,4788985,4788662,4789238,5436861,4789457,146895,4790084,4788877,146999,4791387,4788874,5353900,4790546,5379736,4790636,4790002,5379730,147016,4790005,5394840,4880615,257663,4790044,4790308,4789889,146842,4789345,4788778,4788462,4788513,87796,4788909,1200654,341311,5379127,1227556,4788746,4788650,4788798,719190,4789941,4788579,4790252,4789684,1126190,5445181,4790222,4790967,146988,4789328,4789343,5441866,549323,4790665,4789848,4788690,4789647,4790655,4788546,4788617,146907,4791369,4788751,4789107,4789670,4789930,5379140,4788536,5445170,5445187,146786,4788611,4790068,146865,4790431,4879216,146882,4789216,4789556,4788688,4788825,4789102,4788544,274336,5404071,4789925,4788481,4789965,4789094,146880,4789708,4788834,146948,4790111,4788710,4788990,147010,4788651,4790310,146946,4790960,4789172,4791450,146820,4791413,4789946,959510,146899,4790049,87844,1179297,4789881,4791472,4790095,4788755,4789206,5446016,5353710,4788643,1197980,5422053,1296927,4790146,4788951,4789160,5379739,4788663,5441974,257668,4790081,4790096,5434370,4788991,4791527,4789795,4788819,5448084,4789771,5376735,146789,146917,1200652,5442107,4789754,162277,4790094,4788466,4789289,4789959,4788847,4788701,4791458,4790765,146805,4789979,147042,4789221,4790171,5418793,4788644,4790287,4789865,4789156,4861370,4789682,5379716,4789685,4861358,4790485,4789850,4790309,265012,4788514,4791448,4788623,4790561,4879303,4790003,102574,4861614,4789699,4791516,4791467,4789966,146864,146811,4789833,4790354,4791417,4788449,5353897,5445370,4788804,4861789,265011,4791363,146976,4788958,4789398,4788995,146914,4789944,4789970,146810,147033,5436860,4789132,4788545,146775,146793,4788940,4788750,5448230,5441975,4790168,4788404,5437767,4789896,87649,4790302,4788775,4790625,5364879,4790425,4788869,4791393,4788845,4789356,5403441,4880235,4788739,4788904,4790386,4789571,4788708,4788761,1179239,5362658,4790229,4790382,4790633,4790130,956739,4788838,541450,4791436,4789316,4789364,4791451,146963,4788542,4791454,4788946,4790921,4789717,5339306,4789822,4790234,4790028,4789551,4789838,4790490,5379128,4789559,4788998,4790051,147032,4881254,4791379,4789245,4789165,146809,87002,5448210,146806,4788646,4788784,146780,4789193,1179300,147003,4790114,5444982,5446650,146916,5422054,4789385,4788894,4790200,4789728,4788737,4788722,5446823,4790484,87797,4791521,5415100,4788868,146829,4788885,4790098,5445169,4790364,147005,4788550,5441965,4788723,1179258,4789335,4791483,5375858,4790556,4789963,4790506,4790410,4791501,4789372,4789718,4788665,680300,4790618,4861760,4789956,4791531,5379727,4790113,147038,150857,5448213,1189969,146837,4790601,4789295,4788984,4790331,4788923,4786020,4790192,4790315,4789764,4791368,4789921,146788,4789811,4789906,146852,5445210,4790177,5379721,4790255,209005,4788966,4788772,5436858,4788551,146854,4789247,4788630,4789897,4789555,4789704,4789943,4789399,5422055,5379733,148958,146874,4790432,5375852,4791493,160337,4790247,4791495,4789379,4788626,4788828,4790085,4790198,4790499,4788821,5418794,146863,4788960,4789874,5341042,4790157,4788978,4789227,4788759,4788856,5379139,146859,146860,4790451,4788836,4790140,4788573,1225740,4788500,4789176,4790024,4847001,4788794,1179299,146972,4788451,5437768,4790319,4789234,5375857,4788636,4788696,4790117,4789342,5353483,4788455,999950,5416307,4788867,1268817,4789215,4790208,5344772,4788882,4789916,4790257,4788809,4789880,142993,87821,4789948,4791486,4789265,5448220,4788467,4789332,4788955,146903,257666,341313,4789012,4789942,4789290,341309,5362655,4790203,4789225,4790527,146932,4790612,4788649,4790149,4790608,4790046,5436857,146902,4790478,4788728,4789996,4789805,4789370,4876520,4789984,4788832,147031,4788864,4791520,5445191,259505,4790941,5365793,147030,4790067,5378094,4790148,4790211,146873,4789808,4791635,4790275,4790020,4788850,4791376,146868,4790045,4791407,4790344,4789151,4790312,4861790,4790347,274335,5342015,4788568,4789201,150856,4789967,4788670,717333,541449,4790156,5376736,272431,4791421,4789097,4789903,1200656,4861478,4788697,4790040,4788844,5436926,4788675,86276,4789816,4791514,106257,146884,146803,4790215,4788700,4790123,4789928,4790089,4790609,4788692,4788968,4790448,4790479,1128880,146981,4788570,4791435,4788707,4790301,4789189,4790061,4789932,146831,4788977,4788812,4788678,4791512,4790065,4788976,146799,4788535,4788610,4790217,4788742,5379729,4791465,4790073,4790017,4788837,4788506,4788781,4791375,150858,148960,146827,4790472,5445175,4790021,146964,5353703,4790060,5445173,4788674,4790057,147036,146967,5364873,4789192,4790213,4789716,4790214,4789783,4789915,4788553,4790276,4790437,5447231,5353708,4791440,4788745,4790220,4789700,4878342,4790265,4788939,146824,4788503,4789366,5379714,146769,146944,4789329,4789688,4788853,272428,4788822,4788792,496040,146897,4791490,5382847,4789552,4788887,4791476,4789961,4788583,4788738,4791382,4790295,4790591,4788681,5379726,4790581,4791443,4788661,4788749,147052,4790413,4788917,5379129,4791433,4789252,147059,4789005,1298755,160347,4789857,4789281,4788989,4788873,146937,4790078,4788980,4790009,4788673,146950,1236615,4861359,4788468,4790963,4789157,4790433,5356121,4790012,5412660,5445361,4788559,4789777,4790121,5375853,1179298,4789714,4788457,4788539,146931,146841,4790545,4790124,146787,4788969,5448436,4791629,4790136,4789922,5379132,146812,4790182,1229372,4790365,4788733,4790951,4791513,4791430,146879,4789707,4791423,4789006,4790132,146814,4791400,4791463,4789229,4788463,4788824,4788901,4788886,4789720,146978,5436862,4790116,5404072,4790482,4790497,5445208,4789152,146876,4790328,4789988,4789736,5436854,4789190,4789821,4788590,4791523,4789968,4789701,147041,4790340,4788912,4789161,4790946,5445207,147009,4790341,4789096,4789390,4788669,5379138}'::integer[])))
Heap Blocks: exact=580
-> BitmapAnd (cost=7081.80..7081.80 rows=11 width=0) (actual time=5.376..5.376 rows=0 loops=1)
-> Bitmap Index Scan on asset_resource_group_id_idx (cost=0.00..126.12 rows=2071 width=0) (actual time=0.586..0.586 rows=1455 loops=1)
Index Cond: (resource_group_id = ANY ('{22099,56611,4825,3570,3571,4984,10591,56429,22145,3631,3572,58375,539908,58819,3544,3574,310,3632,5081,4222,5001,3630,3633,3634,3635}'::integer[]))
-> Bitmap Index Scan on asset_pkey (cost=0.00..6955.42 rows=2594 width=0) (actual time=4.735..4.735 rows=2584 loops=1)
Index Cond: (id = ANY ('{5407245,4789312,4790104,4790090,146919,146991,146800,4790169,4790758,4789391,4788565,4788849,4790606,4788529,5352812,4790050,4788988,5411650,4790510,146828,190720,146850,4789374,4791460,4790672,4790092,4791405,4788676,146995,4788504,4788705,4880236,4788471,4791425,4790323,4790394,146958,4789368,4788926,4791498,4790627,5394581,4791389,1179259,4788460,5404746,4789346,4788855,4789952,4790274,4788835,5364871,4788818,4791411,146941,4790961,332077,4788706,4788888,4790334,146961,146774,4790346,146784,4790374,4788839,4790155,4788791,146832,4790911,4788585,4790072,146883,146790,4788852,4789904,4790597,4789726,4788549,147020,4789293,4788713,257665,1296929,4790573,4788517,4788803,148956,5441969,4861681,218407,4791526,1070542,4791616,4788561,4861347,4789900,4790414,5379142,146844,4790224,4790223,4861750,4790352,4789705,5445209,4789338,4790383,146849,4788974,4790454,1285454,4789224,4790342,4790127,4790952,4789171,4790518,4790097,5352811,5448219,4789975,147051,4788817,5410058,4789740,4788711,4789305,142994,4788941,4790202,5375859,1345117,5364876,4788842,257662,5342016,1309728,190719,146996,5375856,146807,4790008,4790187,4788949,4790037,146965,4788771,4790226,5436859,148963,4790125,4789382,4788658,4788653,4790412,4788582,4791394,4790292,4789181,4790646,4789860,4791474,4791401,146796,4789568,4788515,5379724,4791519,4789742,4788488,4789826,4789311,4788458,4791504,4788552,4789002,4861357,4790076,1176643,4789995,4788857,4789763,4791412,4790422,147027,4790010,4788456,4789872,4788702,4789751,4789671,4788628,4882246,4789739,146928,4790466,148961,146823,4790405,5445364,4847857,146925,337612,4861740,87781,4790353,4790491,5418789,4788967,147026,4789759,1218483,5356143,4790069,4790337,5418352,4790201,4788556,4789142,4790399,4788975,4790135,4790197,5404744,4788760,148952,4790142,162300,147019,4790667,4791390,5445174,87830,4789365,4790022,4789935,4789692,4789940,5341047,4789393,4790106,4788660,4790042,5338735,4788905,4789173,4790269,4790253,5343937,4790958,4790277,5445369,4790227,4789566,5379713,146968,4788773,146913,4877887,4788589,5445360,4789936,402588,87853,4791470,146875,265106,4790062,4791534,4790641,4789351,146889,4791522,4789007,4788652,162301,4790164,146881,4788709,4790373,5365763,4790483,4788531,4790939,4791494,4790221,4788647,4790387,5378093,4788913,1189968,5341043,4788508,4791478,4790054,146870,5434365,4788827,4874194,4788509,4791492,147018,5448209,4788604,4788595,4790233,4788714,87641,559765,5415949,4788606,146940,4791507,4791415,5379717,4788557,5378571,4788903,4791496,4788861,4790099,4788829,150859,5445189,146888,4790551,4791418,4790619,4790936,257664,146777,4790325,4788683,4789204,4788475,5404749,146847,5422052,5402838,4788642,4879309,4791484,4788689,4881190,4788664,4790178,5355907,4788511,4789971,4789926,4791447,6000057,5448079,146783,386384,5436513,4791471,4790676,4790126,146838,4790077,4789767,146957,4788487,1197981,1264117,4790039,5395265,146896,4790389,4789982,4789386,4789758,1307879,4789380,4788512,5435652,4788993,4790212,4790392,4788629,4788482,5379737,4788911,4789159,4788726,5440147,5445205,4790023,1296928,5438479,5448428,4790651,4789834,4789768,4791509,4790110,4791403,4788490,5379728,4788631,5446824,1197979,4790948,4790087,146892,5396993,4791385,4790438,4788800,4788762,4788788,4787955,4788858,4790928,4790199,4788541,146782,4788806,4790391,4790372,4790452,4788922,4789292,5448434,4789735,4788562,4790230,4788862,146825,4790599,4791462,4789987,4790307,4790408,146951,5355904,4788848,4790133,5353899,549325,4789045,146962,5434369,4788747,146977,4789883,4788996,4789890,146871,4790536,141097,5444892,4789879,341314,4791479,537917,5353706,4791439,5396836,4788655,4788997,160341,4788994,4789849,4790607,146866,4788492,147037,4789116,4790029,4789341,5353484,5436515,4789810,4791452,4788598,147049,147056,5422059,5445171,5396153,4790572,1054282,4790504,5445363,5356141,87802,4788698,5379734,4791427,4789310,4788494,5445374,352168,4790249,4788992,4789863,274312,4789908,4791444,4791533,1307881,162264,4789852,4790427,4789851,4789244,4788866,4788686,5445172,4788527,4789186,4789010,4788914,146857,1195310,146974,4790063,4790052,4789149,146966,146922,1195309,4791414,4790013,4790457,4790542,4790358,4790289,4788753,5404745,146822,4788774,4790107,5418792,146813,4789564,146970,4789662,4789004,5443583,162265,4874547,5379722,272429,4790385,4789306,4790530,146934,4790605,147022,4790411,5422062,4789812,146867,4791535,4788891,4790492,5378569,4791456,4789563,4788884,4788581,4791627,4790418,4788924,5378573,4789958,4790649,4789931,146885,4788588,4788890,4790395,4790115,5449276,4791402,4790467,4791420,4788477,5434366,4789991,4788789,146839,4789677,4870670,192614,146835,4789815,4791457,5445375,591091,4788616,4791434,4790153,4789902,4790166,5403288,5403662,4785760,4789854,5408807,4788555,146938,146910,4788680,4789313,4788731,4788597,4789337,235319,4788641,147000,146770,4790481,5366452,4789099,426614,4789794,4788695,5445200,4791510,4789814,5445193,4789383,4789856,4789558,148964,4788540,4789911,5407468,5445183,4788727,4788921,146792,4842475,4788715,5445186,5445178,5434367,4791566,4789756,4790363,5422056,146924,4789270,4790271,4790935,4789279,4788659,4790531,461331,4788744,146877,4789333,4790000,4790938,4789732,5355905,4798776,341310,4790380,4791367,4788622,4789937,146900,4789388,4788983,4790521,4788876,4789962,4790557,146949,4788522,4789895,4790074,4788486,4795588,4791428,4788603,5448211,5441968,4790256,4789095,4789144,147057,4791398,4788764,4790237,4791621,6000058,4790137,4789223,4788624,4790673,4788833,4788787,4789792,4790632,5403661,4880753,4788476,4788584,146986,4789318,4790378,4788447,4790495,4789778,146798,274311,4790922,4790653,4789298,4788615,5445359,4788591,4790071,4788538,162276,4788986,5378568,4788770,4874722,5379130,4788919,147025,220287,5411698,4789207,147001,4788621,4789868,4791473,4789350,4788638,4788566,4788452,4789363,4791397,147060,4788732,959491,4789914,5438677,4790589,4788499,4788910,4788534,4789934,146929,4790080,4791453,259506,4788956,4789339,146936,4790351,5403287,4787892,4789302,4788619,4789139,4788682,1342603,4790299,4789317,4789779,4789000,4791503,4790279,147044,146971,5445372,4788454,160330,4789835,4790026,4790144,4790025,4788461,5434372,4790326,4790193,4791384,4788639,717317,4788981,147048,4790238,4788810,4790403,4788464,5352807,146893,5436856,146959,4790058,4790027,4788734,5379719,4789212,4790444,4790209,4790091,192613,4790043,4788505,146778,538840,4789985,4789299,4791570,4790335,4789831,4788671,227800,5418791,146830,146998,5445206,4788801,4788717,4789352,235322,4791416,4789100,4789725,4789347,4790640,5412662,4788880,4790517,4790035,4788915,4788625,148951,4791432,274313,146815,4788987,4791364,4789774,4788879,4788637,4788519,4788667,4791497,4788769,1307887,4788777,4791623,4790246,4790666,146826,4789253,4788593,4788743,4789263,4791449,4790170,4789802,4788932,1227557,4788640,4789180,5446647,4791378,4790540,4789888,146960,4788618,4791365,4790588,5379731,4788973,4790129,4790593,146955,4788518,4789964,4789770,146853,5367769,4789801,4788479,4789969,146840,220286,4790330,4789887,4790001,5415950,4789691,1307880,146906,4790327,337611,4791396,4791508,4791500,146846,4789954,4790377,4789711,4788814,265075,147055,4790268,4868879,4861480,549328,4789674,4790316,4788448,4790298,146891,87798,4791461,4789373,4791626,4789258,4789257,4788916,4789929,146953,4788927,4790348,4791438,5441967,4789753,87843,240970,4788580,4788530,4789884,4788896,4790648,5446635,4788826,4788634,4789927,4790088,4788972,4788586,5356140,4788807,4861759,146869,4791636,146921,4790675,5362656,146939,4790522,4789994,4788656,4788811,5376734,4788729,4790147,4790496,4788893,4861743,4790112,146898,4788575,4789191,190723,5417620,4789898,4788601,4789148,4790258,5364874,4791532,4789825,146947,146817,4788473,4788907,4870668,4788666,146795,265066,4790033,4789950,4790367,4791491,4790582,148965,4790533,1236616,4791373,147024,146912,1218481,4791464,4788898,4788558,4790509,4791371,4790349,5445357,4788507,5344155,4790251,4790464,4789261,5417598,4788526,4791446,4789869,146845,4790356,5438480,4791441,4544923,4790947,4791404,4789781,4790131,4789456,146909,5438481,5436855,5396996,146990,4789235,147004,4788480,4789709,4789277,4788883,4790471,146920,5434371,4788942,4788768,4791528,4788830,4788918,4788587,274337,1307888,5415948,4790620,4791482,235321,4790388,4789389,4788627,102573,4788963,4788785,4788906,146933,1283104,146894,5436512,4791399,4789167,4788881,5356506,4790511,4791628,4790569,4788543,4789784,4789008,341308,4788758,1174249,147046,147021,4788938,5366823,4791442,4789813,5343940,4791525,4789750,4791429,4790439,4788605,4790629,4788571,4791529,4790525,4789325,4789322,4790470,4790943,4790175,5441966,5422057,147012,4788971,4790286,4789122,5436514,4788736,5379738,4788947,4861599,4790248,461332,4789827,4791422,4788863,4791374,4788599,4788871,4788962,4790109,146855,4789976,5364859,4788720,4789121,146908,4788672,4788793,4790332,4789875,146969,4790390,4788510,5336180,4789381,4870537,4788679,142988,4790047,5376733,5418350,4790463,4791617,4790945,4790514,4790371,4789977,5438387,4790932,4790639,4790613,4790401,4789836,4791631,5445176,4788563,4788704,332078,5338734,146992,4791431,4791455,352169,148962,4788496,5436853,146915,4790145,4788953,5378567,146954,5444556,4788945,4790138,4790070,4789163,4788860,4789939,5445362,4788815,4790426,4790066,4788999,4870669,4790421,4791502,274310,5355906,4789924,4789957,5434368,4791530,147015,4790128,146901,4790575,4791391,4789218,4790538,4788936,4789997,147045,4788635,4790186,87812,4788766,142987,5378331,4788851,5448072,4788897,4791408,4790048,4790086,5378329,4788935,4788567,549324,272430,5352813,4789715,4788870,4790082,141096,4790450,4788899,4790031,4791362,4790181,5417358,146802,4788964,4789653,4790056,146997,146943,4788875,4791437,4789727,4789236,141098,4790266,240969,4788576,4790036,4861739,5436516,4791517,4788944,4791630,5378570,4788831,4788699,4788596,146848,4790441,4790552,4790278,4790293,147013,4788752,4790179,4788820,87806,549327,146797,147028,4791624,4788450,4788520,4788495,4788554,4790576,5403446,4788823,5445371,4789788,4789174,5379741,5379725,4791499,146987,4790163,4790304,4788608,4790283,4791370,4790956,146984,146890,4789878,146980,4788813,147007,148954,146904,4789919,4790154,146985,5448470,142989,5352816,4788900,5422061,4789846,4788502,4789110,4789101,4788937,4882250,5446649,146886,5338733,4788725,4788693,148957,259503,4788633,4789130,4788790,4790429,4789300,5445211,5379711,4874548,142992,147029,4789855,4789785,337610,146833,4788472,4788569,4788782,4790006,263177,4788613,4788533,5435651,4788677,4789892,146801,4790460,4790660,162275,4788712,146781,4788470,4788446,4791518,4788474,4789387,146982,4789203,4791380,5412661,146989,4788865,4788560,146994,5379131,146861,4788632,4791386,146834,4790313,4788645,4788763,4789990,4788718,4788484,4788748,4798810,4790435,4790407,4788895,147006,4791489,4790311,4791392,4790462,4789104,4788808,4789947,146821,4790440,5352810,4789009,4789920,4789011,4790664,147014,4789284,146923,4789775,4789274,4789205,4789336,4790656,4790486,4788943,147011,146843,5441865,4790942,4791459,4846590,4788491,146856,4788757,5353705,4789797,4791475,4789697,4790118,4789246,4790375,4790041,5445184,4790456,4791381,4788548,332076,146771,4789955,4791488,4789554,4789999,4790592,5407243,4788920,4788547,5438478,146979,4788779,4791480,4790318,146878,426613,4788525,4790105,4789737,4788501,5445373,4788687,4790637,4789989,5364875,5445356,4788594,4790360,4788776,4788577,5445190,4788892,4788961,4788754,4791409,146819,1298754,4788572,6000056,146804,5445358,4789255,4788493,5448431,147023,4788908,4789696,549326,4790093,4789870,147034,341307,4788841,4791511,4788889,4790103,4789760,5338736,4790925,5448429,4788796,4789561,148953,4789745,4789800,4784178,551927,4790953,4791506,5404748,4788780,265108,4789046,4790519,394529,4789145,160339,4788516,147047,4789793,4790195,4788925,147002,4790565,1003447,4788802,146993,4790393,4790134,5353709,146858,4790512,259507,4789757,4880474,4790108,218408,4790059,4790586,4788929,5449277,4788724,5418353,4791505,4789143,160345,4789362,4789001,4790940,4791481,5379723,4788574,4790416,147039,4788730,4789791,4790954,4788648,146785,147061,1218482,4791445,4788878,4790100,4790381,4790236,4788498,4789882,4788928,5404070,4788524,4789327,4789790,4788489,5336162,4861738,5445177,4790083,4790306,4789330,4791372,4790384,4791419,4790578,1200655,4789202,4790776,4789273,4790650,4789820,717318,4790616,4791625,4791395,4788783,4788592,4789676,4789980,147043,4788564,4789786,5379720,4788954,4789769,4790120,4789891,4788684,146975,4788930,4790415,4789858,4789164,5404747,1042872,4788854,4789738,4789194,4788843,5336181,4791468,4788478,5435992,4790267,146862,4790379,146918,5448073,146794,4790628,4789843,4790030,4788607,1200653,4789998,4790064,4788600,4790004,4789864,5353707,4791383,4791424,4788685,5378572,5448074,4789182,5367012,5365764,148950,4788691,190724,4789125,4789323,4789105,4788609,4790568,4789993,4788602,4788933,4788716,4788840,4789268,4788469,4788965,4790767,265087,4789113,4788948,5438679,4790228,5418351,4790583,4790400,87837,4790404,4790321,4788797,146942,4790442,4788719,146818,4788979,4788872,5373275,5448430,5449275,146952,4790376,5341046,4789901,87805,4788654,5396859,4791477,4789909,4788657,4789560,146911,4788934,4788767,4789949,5353901,5422060,5375855,5442106,5418790,4544924,4788703,4788532,5379718,4788957,4789162,4790449,4789912,4789807,4790652,87001,5445188,4788694,106256,4788950,146983,4790173,4788612,146935,146851,5395266,146872,4788620,4861741,4790645,146956,4789910,147040,4791466,4791426,4790541,4790563,4790165,5407244,146808,5445212,4789348,146973,4791469,4788952,5378330,4790626,235320,160343,146945,4788528,4789818,4788453,4879319,4789111,4790158,4788537,5445213,5379715,4791410,1003485,4789859,4789885,4788741,4789755,4790272,4788765,4790345,4789003,5410059,4788859,146772,146927,4788846,274315,4788721,5356142,4790547,5434364,4788483,4790032,4790188,4789747,4789804,4788668,5378332,4789315,87795,4789842,5443944,4789334,4789320,4788816,4790119,4788735,4788786,5396997,5409573,4791406,4788959,5379732,4790122,146887,4788740,4789301,4788931,4790075,4789844,4791515,146776,588472,147008,160335,4789098,4791388,5444240,4789913,4788485,146773,4788614,146791,4789724,4789693,4790468,4791487,4788756,4788459,4789871,257667,210898,146836,4788523,4791377,4790102,4790564,4788497,146779,4790240,4789840,4790055,4788795,4789953,4789114,4790194,142991,4790366,147017,148949,4791485,4789847,717108,4789326,4788521,4788465,4790244,146816,146926,4788578,4790553,5422058,5445185,4791524,5353704,5360469,4788799,4789734,4790590,4861479,4790079,5434363,1174248,4790101,146930,4790016,147053,4789723,5445182,4788970,4788805,4790638,147035,4790610,4789367,147058,4788902,4790291,146905,4791366,5438678,4788982,4788985,4788662,4789238,5436861,4789457,146895,4790084,4788877,146999,4791387,4788874,5353900,4790546,5379736,4790636,4790002,5379730,147016,4790005,5394840,4880615,257663,4790044,4790308,4789889,146842,4789345,4788778,4788462,4788513,87796,4788909,1200654,341311,5379127,1227556,4788746,4788650,4788798,719190,4789941,4788579,4790252,4789684,1126190,5445181,4790222,4790967,146988,4789328,4789343,5441866,549323,4790665,4789848,4788690,4789647,4790655,4788546,4788617,146907,4791369,4788751,4789107,4789670,4789930,5379140,4788536,5445170,5445187,146786,4788611,4790068,146865,4790431,4879216,146882,4789216,4789556,4788688,4788825,4789102,4788544,274336,5404071,4789925,4788481,4789965,4789094,146880,4789708,4788834,146948,4790111,4788710,4788990,147010,4788651,4790310,146946,4790960,4789172,4791450,146820,4791413,4789946,959510,146899,4790049,87844,1179297,4789881,4791472,4790095,4788755,4789206,5446016,5353710,4788643,1197980,5422053,1296927,4790146,4788951,4789160,5379739,4788663,5441974,257668,4790081,4790096,5434370,4788991,4791527,4789795,4788819,5448084,4789771,5376735,146789,146917,1200652,5442107,4789754,162277,4790094,4788466,4789289,4789959,4788847,4788701,4791458,4790765,146805,4789979,147042,4789221,4790171,5418793,4788644,4790287,4789865,4789156,4861370,4789682,5379716,4789685,4861358,4790485,4789850,4790309,265012,4788514,4791448,4788623,4790561,4879303,4790003,102574,4861614,4789699,4791516,4791467,4789966,146864,146811,4789833,4790354,4791417,4788449,5353897,5445370,4788804,4861789,265011,4791363,146976,4788958,4789398,4788995,146914,4789944,4789970,146810,147033,5436860,4789132,4788545,146775,146793,4788940,4788750,5448230,5441975,4790168,4788404,5437767,4789896,87649,4790302,4788775,4790625,5364879,4790425,4788869,4791393,4788845,4789356,5403441,4880235,4788739,4788904,4790386,4789571,4788708,4788761,1179239,5362658,4790229,4790382,4790633,4790130,956739,4788838,541450,4791436,4789316,4789364,4791451,146963,4788542,4791454,4788946,4790921,4789717,5339306,4789822,4790234,4790028,4789551,4789838,4790490,5379128,4789559,4788998,4790051,147032,4881254,4791379,4789245,4789165,146809,87002,5448210,146806,4788646,4788784,146780,4789193,1179300,147003,4790114,5444982,5446650,146916,5422054,4789385,4788894,4790200,4789728,4788737,4788722,5446823,4790484,87797,4791521,5415100,4788868,146829,4788885,4790098,5445169,4790364,147005,4788550,5441965,4788723,1179258,4789335,4791483,5375858,4790556,4789963,4790506,4790410,4791501,4789372,4789718,4788665,680300,4790618,4861760,4789956,4791531,5379727,4790113,147038,150857,5448213,1189969,146837,4790601,4789295,4788984,4790331,4788923,4786020,4790192,4790315,4789764,4791368,4789921,146788,4789811,4789906,146852,5445210,4790177,5379721,4790255,209005,4788966,4788772,5436858,4788551,146854,4789247,4788630,4789897,4789555,4789704,4789943,4789399,5422055,5379733,148958,146874,4790432,5375852,4791493,160337,4790247,4791495,4789379,4788626,4788828,4790085,4790198,4790499,4788821,5418794,146863,4788960,4789874,5341042,4790157,4788978,4789227,4788759,4788856,5379139,146859,146860,4790451,4788836,4790140,4788573,1225740,4788500,4789176,4790024,4847001,4788794,1179299,146972,4788451,5437768,4790319,4789234,5375857,4788636,4788696,4790117,4789342,5353483,4788455,999950,5416307,4788867,1268817,4789215,4790208,5344772,4788882,4789916,4790257,4788809,4789880,142993,87821,4789948,4791486,4789265,5448220,4788467,4789332,4788955,146903,257666,341313,4789012,4789942,4789290,341309,5362655,4790203,4789225,4790527,146932,4790612,4788649,4790149,4790608,4790046,5436857,146902,4790478,4788728,4789996,4789805,4789370,4876520,4789984,4788832,147031,4788864,4791520,5445191,259505,4790941,5365793,147030,4790067,5378094,4790148,4790211,146873,4789808,4791635,4790275,4790020,4788850,4791376,146868,4790045,4791407,4790344,4789151,4790312,4861790,4790347,274335,5342015,4788568,4789201,150856,4789967,4788670,717333,541449,4790156,5376736,272431,4791421,4789097,4789903,1200656,4861478,4788697,4790040,4788844,5436926,4788675,86276,4789816,4791514,106257,146884,146803,4790215,4788700,4790123,4789928,4790089,4790609,4788692,4788968,4790448,4790479,1128880,146981,4788570,4791435,4788707,4790301,4789189,4790061,4789932,146831,4788977,4788812,4788678,4791512,4790065,4788976,146799,4788535,4788610,4790217,4788742,5379729,4791465,4790073,4790017,4788837,4788506,4788781,4791375,150858,148960,146827,4790472,5445175,4790021,146964,5353703,4790060,5445173,4788674,4790057,147036,146967,5364873,4789192,4790213,4789716,4790214,4789783,4789915,4788553,4790276,4790437,5447231,5353708,4791440,4788745,4790220,4789700,4878342,4790265,4788939,146824,4788503,4789366,5379714,146769,146944,4789329,4789688,4788853,272428,4788822,4788792,496040,146897,4791490,5382847,4789552,4788887,4791476,4789961,4788583,4788738,4791382,4790295,4790591,4788681,5379726,4790581,4791443,4788661,4788749,147052,4790413,4788917,5379129,4791433,4789252,147059,4789005,1298755,160347,4789857,4789281,4788989,4788873,146937,4790078,4788980,4790009,4788673,146950,1236615,4861359,4788468,4790963,4789157,4790433,5356121,4790012,5412660,5445361,4788559,4789777,4790121,5375853,1179298,4789714,4788457,4788539,146931,146841,4790545,4790124,146787,4788969,5448436,4791629,4790136,4789922,5379132,146812,4790182,1229372,4790365,4788733,4790951,4791513,4791430,146879,4789707,4791423,4789006,4790132,146814,4791400,4791463,4789229,4788463,4788824,4788901,4788886,4789720,146978,5436862,4790116,5404072,4790482,4790497,5445208,4789152,146876,4790328,4789988,4789736,5436854,4789190,4789821,4788590,4791523,4789968,4789701,147041,4790340,4788912,4789161,4790946,5445207,147009,4790341,4789096,4789390,4788669,5379138}'::integer[]))
Planning time: 3.948 ms
Execution time: 9.172 ms
迁到tidb之后,同样查询要1.3秒左右。tidb的执行计划如下:
Selection_6, 465.94, 894, root, , time:69.1ms, loops:2, RU:7.126364, eq(res_cube_server_stg.t_asset.deleted, 0), in(res_cube_server_stg.t_asset.group_id, 22099, 56611, 4825, 3570, 3571, 4984, 10591, 56429, 22145, 3631, 3572, 58375, 539908, 58819, 3544, 3574, 310, 3632, 5081, 4222, 5001, 3630, 3633, 3634, 3635), 1.04 MB, N/A
└─Batch_Point_Get_5, 2594.00, 2593, root, table:t_asset, time:67.5ms, loops:3, BatchGet:{num_rpc:3, total_time:82.6ms}, total_process_time: 64ns, total_wait_time: 5ns, tikv_wall_time: 74ms, scan_detail: {total_process_keys: 2593, total_process_keys_size: 417880, total_keys: 2597, get_snapshot_time: 122.1µs, rocksdb: {delete_skipped_count: 10, key_skipped_count: 3, block: {cache_hit_count: 10801}}}, handle:[86276 87001 87002 87641 87649 87781 87795 87796 87797 87798 87802 87805 87806 87812 87821 87830 87837 87843 87844 87853 102573 102574 106256 106257 141096 141097 141098 142987 142988 142989 142991 142992 142993 142994 146769 146770 146771 146772 146773 146774 146775 146776 146777 146778 146779 146780 146781 146782 146783 146784 146785 146786 146787 146788 146789 146790 146791 146792 146793 146794 146795 146796 146797 146798 146799 146800 146801 146802 146803 146804 146805 146806 146807 146808 146809 146810 146811 146812 146813 146814 146815 146816 146817 146818 146819 146820 146821 146822 146823 146824 146825 146826 146827 146828 146829 146830 146831 146832 146833 146834 146835 146836 146837 146838 146839 146840 146841 146842 146843 146844 146845 146846 146847 146848 146849 146850 146851 146852 146853 146854 146855 146856 146857 146858 146859 146860 146861 146862 146863 146864 146865 146866 146867 146868 146869 146870 146871 146872 146873 146874 146875 146876 146877 146878 146879 146880 146881 146882 146883 146884 146885 146886 146887 146888 146889 146890 146891 146892 146893 146894 146895 146896 146897 146898 146899 146900 146901 146902 146903 146904 146905 146906 146907 146908 146909 146910 146911 146912 146913 146914 146915 146916 146917 146918 146919 146920 146921 146922 146923 146924 146925 146926 146927 146928 146929 146930 146931 146932 146933 146934 146935 146936 146937 146938 146939 146940 146941 146942 146943 146944 146945 146946 146947 146948 146949 146950 146951 146952 146953 146954 146955 146956 146957 146958 146959 146960 146961 146962 146963 146964 146965 146966 146967 146968 146969 146970 146971 146972 146973 146974 146975 146976 146977 146978 146979 146980 146981 146982 146983 146984 146985 146986 146987 146988 146989 146990 146991 146992 146993 146994 146995 146996 146997 146998 146999 147000 147001 147002 147003 147004 147005 147006 147007 147008 147009 147010 147011 147012 147013 147014 147015 147016 147017 147018 147019 147020 147021 147022 147023 147024 147025 147026 147027 147028 147029 147030 147031 147032 147033 147034 147035 147036 147037 147038 147039 147040 147041 147042 147043 147044 147045 147046 147047 147048 147049 147051 147052 147053 147055 147056 147057 147058 147059 147060 147061 148949 148950 148951 148952 148953 148954 148956 148957 148958 148960 148961 148962 148963 148964 148965 150856 150857 150858 150859 160330 160335 160337 160339 160341 160343 160345 160347 162264 162265 162275 162276 162277 162300 162301 190719 190720 190723 190724 192613 192614 209005 210898 218407 218408 220286 220287 227800 235319 235320 235321 235322 240969 240970 257662 257663 257664 257665 257666 257667 257668 259503 259505 259506 259507 263177 265011 265012 265066 265075 265087 265106 265108 272428 272429 272430 272431 274310 274311 274312 274313 274315 274335 274336 274337 332076 332077 332078 337610 337611 337612 341307 341308 341309 341310 341311 341313 341314 352168 352169 386384 394529 402588 426613 426614 461331 461332 496040 537917 538840 541449 541450 549323 549324 549325 549326 549327 549328 551927 559765 588472 591091 680300 717108 717317 717318 717333 719190 956739 959491 959510 999950 1003447 1003485 1042872 1054282 1070542 1126190 1128880 1174248 1174249 1176643 1179239 1179258 1179259 1179297 1179298 1179299 1179300 1189968 1189969 1195309 1195310 1197979 1197980 1197981 1200652 1200653 1200654 1200655 1200656 1218481 1218482 1218483 1225740 1227556 1227557 1229372 1236615 1236616 1264117 1268817 1283104 1285454 1296927 1296928 1296929 1298754 1298755 1307879 1307880 1307881 1307887 1307888 1309728 1342603 1345117 4544923 4544924 4784178 4785760 4786020 4787892 4787955 4788404 4788446 4788447 4788448 4788449 4788450 4788451 4788452 4788453 4788454 4788455 4788456 4788457 4788458 4788459 4788460 4788461 4788462 4788463 4788464 4788465 4788466 4788467 4788468 4788469 4788470 4788471 4788472 4788473 4788474 4788475 4788476 4788477 4788478 4788479 4788480 4788481 4788482 4788483 4788484 4788485 4788486 4788487 4788488 4788489 4788490 4788491 4788492 4788493 4788494 4788495 4788496 4788497 4788498 4788499 4788500 4788501 4788502 4788503 4788504 4788505 4788506 4788507 4788508 4788509 4788510 4788511 4788512 4788513 4788514 4788515 4788516 4788517 4788518 4788519 4788520 4788521 4788522 4788523 4788524 4788525 4788526 4788527 4788528 4788529 4788530 4788531 4788532 4788533 4788534 4788535 4788536 4788537 4788538 4788539 4788540 4788541 4788542 4788543 4788544 4788545 4788546 4788547 4788548 4788549 4788550 4788551 4788552 4788553 4788554 4788555 4788556 4788557 4788558 4788559 4788560 4788561 4788562 4788563 4788564 4788565 4788566 4788567 4788568 4788569 4788570 4788571 4788572 4788573 4788574 4788575 4788576 4788577 4788578 4788579 4788580 4788581 4788582 4788583 4788584 4788585 4788586 4788587 4788588 4788589 4788590 4788591 4788592 4788593 4788594 4788595 4788596 4788597 4788598 4788599 4788600 4788601 4788602 4788603 4788604 4788605 4788606 4788607 4788608 4788609 4788610 4788611 4788612 4788613 4788614 4788615 4788616 4788617 4788618 4788619 4788620 4788621 4788622 4788623 4788624 4788625 4788626 4788627 4788628 4788629 4788630 4788631 4788632 4788633 4788634 4788635 4788636 4788637 4788638 4788639 4788640 4788641 4788642 4788643 4788644 4788645 4788646 4788647 4788648 4788649 4788650 4788651 4788652 4788653 4788654 4788655 4788656 4788657 4788658 4788659 4788660 4788661 4788662 4788663 4788664 4788665 4788666 4788667 4788668 4788669 4788670 4788671 4788672 4788673 4788674 4788675 4788676 4788677 4788678 4788679 4788680 4788681 4788682 4788683 4788684 4788685 4788686 4788687 4788688 4788689 4788690 4788691 4788692 4788693 4788694 4788695 4788696 4788697 4788698 4788699 4788700 4788701 4788702 4788703 4788704 4788705 4788706 4788707 4788708 4788709 4788710 4788711 4788712 4788713 4788714 4788715 4788716 4788717 4788718 4788719 4788720 4788721 4788722 4788723 4788724 4788725 4788726 4788727 4788728 4788729 4788730 4788731 4788732 4788733 4788734 4788735 4788736 4788737 4788738 4788739 4788740 4788741 4788742 4788743 4788744 4788745 4788746 4788747 4788748 4788749 4788750 4788751 4788752 4788753 4788754 4788755 4788756 4788757 4788758 4788759 4788760 4788761 4788762 4788763 4788764 4788765 4788766 4788767 4788768 4788769 4788770 4788771 4788772 4788773 4788774 4788775 4788776 4788777 4788778 4788779 4788780 4788781 4788782 4788783 4788784 4788785 4788786 4788787 4788788 4788789 4788790 4788791 4788792 4788793 4788794 4788795 4788796 4788797 4788798 4788799 4788800 4788801 4788802 4788803 4788804 4788805 4788806 4788807 4788808 4788809 4788810 4788811 4788812 4788813 4788814 4788815 4788816 4788817 4788818 4788819 4788820 4788821 4788822 4788823 4788824 4788825 4788826 4788827 4788828 4788829 4788830 4788831 4788832 4788833 4788834 4788835 4788836 4788837 4788838 4788839 4788840 4788841 4788842 4788843 4788844 4788845 4788846 4788847 4788848 4788849 4788850 4788851 4788852 4788853 4788854 4788855 4788856 4788857 4788858 4788859 4788860 4788861 4788862 4788863 4788864 4788865 4788866 4788867 4788868 4788869 4788870 4788871 4788872 4788873 4788874 4788875 4788876 4788877 4788878 4788879 4788880 4788881 4788882 4788883 4788884 4788885 4788886 4788887 4788888 4788889 4788890 4788891 4788892 4788893 4788894 4788895 4788896 4788897 4788898 4788899 4788900 4788901 4788902 4788903 4788904 4788905 4788906 4788907 4788908 4788909 4788910 4788911 4788912 4788913 4788914 4788915 4788916 4788917 4788918 4788919 4788920 4788921 4788922 4788923 4788924 4788925 4788926 4788927 4788928 4788929 4788930 4788931 4788932 4788933 4788934 4788935 4788936 4788937 4788938 4788939 4788940 4788941 4788942 4788943 4788944 4788945 4788946 4788947 4788948 4788949 4788950 4788951 4788952 4788953 4788954 4788955 4788956 4788957 4788958 4788959 4788960 4788961 4788962 4788963 4788964 4788965 4788966 4788967 4788968 4788969 4788970 4788971 4788972 4788973 4788974 4788975 4788976 4788977 4788978 4788979 4788980 4788981 4788982 4788983 4788984 4788985 4788986 4788987 4788988 4788989 4788990 4788991 4788992 4788993 4788994 4788995 4788996 4788997 4788998 4788999 4789000 4789001 4789002 4789003 4789004 4789005 4789006 4789007 4789008 4789009 4789010 4789011 4789012 4789045 4789046 4789094 4789095 4789096 4789097 4789098 4789099 4789100 4789101 4789102 4789104 4789105 4789107 4789110 4789111 4789113 4789114 4789116 4789121 4789122 4789125 4789130 4789132 4789139 4789142 4789143 4789144 4789145 4789148 4789149 4789151 4789152 4789156 4789157 4789159 4789160 4789161 4789162 4789163 4789164 4789165 4789167 4789171 4789172 4789173 4789174 4789176 4789180 4789181 4789182 4789186 4789189 4789190 4789191 4789192 4789193 4789194 4789201 4789202 4789203 4789204 4789205 4789206 4789207 4789212 4789215 4789216 4789218 4789221 4789223 4789224 4789225 4789227 4789229 4789234 4789235 4789236 4789238 4789244 4789245 4789246 4789247 4789252 4789253 4789255 4789257 4789258 4789261 4789263 4789265 4789268 4789270 4789273 4789274 4789277 4789279 4789281 4789284 4789289 4789290 4789292 4789293 4789295 4789298 4789299 4789300 4789301 4789302 4789305 4789306 4789310 4789311 4789312 4789313 4789315 4789316 4789317 4789318 4789320 4789322 4789323 4789325 4789326 4789327 4789328 4789329 4789330 4789332 4789333 4789334 4789335 4789336 4789337 4789338 4789339 4789341 4789342 4789343 4789345 4789346 4789347 4789348 4789350 4789351 4789352 4789356 4789362 4789363 4789364 4789365 4789366 4789367 4789368 4789370 4789372 4789373 4789374 4789379 4789380 4789381 4789382 4789383 4789385 4789386 4789387 4789388 4789389 4789390 4789391 4789393 4789398 4789399 4789456 4789457 4789551 4789552 4789554 4789555 4789556 4789558 4789559 4789560 4789561 4789563 4789564 4789566 4789568 4789571 4789647 4789653 4789662 4789670 4789671 4789674 4789676 4789677 4789682 4789684 4789685 4789688 4789691 4789692 4789693 4789696 4789697 4789699 4789700 4789701 4789704 4789705 4789707 4789708 4789709 4789711 4789714 4789715 4789716 4789717 4789718 4789720 4789723 4789724 4789725 4789726 4789727 4789728 4789732 4789734 4789735 4789736 4789737 4789738 4789739 4789740 4789742 4789745 4789747 4789750 4789751 4789753 4789754 4789755 4789756 4789757 4789758 4789759 4789760 4789763 4789764 4789767 4789768 4789769 4789770 4789771 4789774 4789775 4789777 4789778 4789779 4789781 4789783 4789784 4789785 4789786 4789788 4789790 4789791 4789792 4789793 4789794 4789795 4789797 4789800 4789801 4789802 4789804 4789805 4789807 4789808 4789810 4789811 4789812 4789813 4789814 4789815 4789816 4789818 4789820 4789821 4789822 4789825 4789826 4789827 4789831 4789833 4789834 4789835 4789836 4789838 4789840 4789842 4789843 4789844 4789846 4789847 4789848 4789849 4789850 4789851 4789852 4789854 4789855 4789856 4789857 4789858 4789859 4789860 4789863 4789864 4789865 4789868 4789869 4789870 4789871 4789872 4789874 4789875 4789878 4789879 4789880 4789881 4789882 4789883 4789884 4789885 4789887 4789888 4789889 4789890 4789891 4789892 4789895 4789896 4789897 4789898 4789900 4789901 4789902 4789903 4789904 4789906 4789908 4789909 4789910 4789911 4789912 4789913 4789914 4789915 4789916 4789919 4789920 4789921 4789922 4789924 4789925 4789926 4789927 4789928 4789929 4789930 4789931 4789932 4789934 4789935 4789936 4789937 4789939 4789940 4789941 4789942 4789943 4789944 4789946 4789947 4789948 4789949 4789950 4789952 4789953 4789954 4789955 4789956 4789957 4789958 4789959 4789961 4789962 4789963 4789964 4789965 4789966 4789967 4789968 4789969 4789970 4789971 4789975 4789976 4789977 4789979 4789980 4789982 4789984 4789985 4789987 4789988 4789989 4789990 4789991 4789993 4789994 4789995 4789996 4789997 4789998 4789999 4790000 4790001 4790002 4790003 4790004 4790005 4790006 4790008 4790009 4790010 4790012 4790013 4790016 4790017 4790020 4790021 4790022 4790023 4790024 4790025 4790026 4790027 4790028 4790029 4790030 4790031 4790032 4790033 4790035 4790036 4790037 4790039 4790040 4790041 4790042 4790043 4790044 4790045 4790046 4790047 4790048 4790049 4790050 4790051 4790052 4790054 4790055 4790056 4790057 4790058 4790059 4790060 4790061 4790062 4790063 4790064 4790065 4790066 4790067 4790068 4790069 4790070 4790071 4790072 4790073 4790074 4790075 4790076 4790077 4790078 4790079 4790080 4790081 4790082 4790083 4790084 4790085 4790086 4790087 4790088 4790089 4790090 4790091 4790092 4790093 4790094 4790095 4790096 4790097 4790098 4790099 4790100 4790101 4790102 4790103 4790104 4790105 4790106 4790107 4790108 4790109 4790110 4790111 4790112 4790113 4790114 4790115 4790116 4790117 4790118 4790119 4790120 4790121 4790122 4790123 4790124 4790125 4790126 4790127 4790128 4790129 4790130 4790131 4790132 4790133 4790134 4790135 4790136 4790137 4790138 4790140 4790142 4790144 4790145 4790146 4790147 4790148 4790149 4790153 4790154 4790155 4790156 4790157 4790158 4790163 4790164 4790165 4790166 4790168 4790169 4790170 4790171 4790173 4790175 4790177 4790178 4790179 4790181 4790182 4790186 4790187 4790188 4790192 4790193 4790194 4790195 4790197 4790198 4790199 4790200 4790201 4790202 4790203 4790208 4790209 4790211 4790212 4790213 4790214 4790215 4790217 4790220 4790221 4790222 4790223 4790224 4790226 4790227 4790228 4790229 4790230 4790233 4790234 4790236 4790237 4790238 4790240 4790244 4790246 4790247 4790248 4790249 4790251 4790252 4790253 4790255 4790256 4790257 4790258 4790265 4790266 4790267 4790268 4790269 4790271 4790272 4790274 4790275 4790276 4790277 4790278 4790279 4790283 4790286 4790287 4790289 4790291 4790292 4790293 4790295 4790298 4790299 4790301 4790302 4790304 4790306 4790307 4790308 4790309 4790310 4790311 4790312 4790313 4790315 4790316 4790318 4790319 4790321 4790323 4790325 4790326 4790327 4790328 4790330 4790331 4790332 4790334 4790335 4790337 4790340 4790341 4790342 4790344 4790345 4790346 4790347 4790348 4790349 4790351 4790352 4790353 4790354 4790356 4790358 4790360 4790363 4790364 4790365 4790366 4790367 4790371 4790372 4790373 4790374 4790375 4790376 4790377 4790378 4790379 4790380 4790381 4790382 4790383 4790384 4790385 4790386 4790387 4790388 4790389 4790390 4790391 4790392 4790393 4790394 4790395 4790399 4790400 4790401 4790403 4790404 4790405 4790407 4790408 4790410 4790411 4790412 4790413 4790414 4790415 4790416 4790418 4790421 4790422 4790425 4790426 4790427 4790429 4790431 4790432 4790433 4790435 4790437 4790438 4790439 4790440 4790441 4790442 4790444 4790448 4790449 4790450 4790451 4790452 4790454 4790456 4790457 4790460 4790462 4790463 4790464 4790466 4790467 4790468 4790470 4790471 4790472 4790478 4790479 4790481 4790482 4790483 4790484 4790485 4790486 4790490 4790491 4790492 4790495 4790496 4790497 4790499 4790504 4790506 4790509 4790510 4790511 4790512 4790514 4790517 4790518 4790519 4790521 4790522 4790525 4790527 4790530 4790531 4790533 4790536 4790538 4790540 4790541 4790542 4790545 4790546 4790547 4790551 4790552 4790553 4790556 4790557 4790561 4790563 4790564 4790565 4790568 4790569 4790572 4790573 4790575 4790576 4790578 4790581 4790582 4790583 4790586 4790588 4790589 4790590 4790591 4790592 4790593 4790597 4790599 4790601 4790605 4790606 4790607 4790608 4790609 4790610 4790612 4790613 4790616 4790618 4790619 4790620 4790625 4790626 4790627 4790628 4790629 4790632 4790633 4790636 4790637 4790638 4790639 4790640 4790641 4790645 4790646 4790648 4790649 4790650 4790651 4790652 4790653 4790655 4790656 4790660 4790664 4790665 4790666 4790667 4790672 4790673 4790675 4790676 4790758 4790765 4790767 4790776 4790911 4790921 4790922 4790925 4790928 4790932 4790935 4790936 4790938 4790939 4790940 4790941 4790942 4790943 4790945 4790946 4790947 4790948 4790951 4790952 4790953 4790954 4790956 4790958 4790960 4790961 4790963 4790967 4791362 4791363 4791364 4791365 4791366 4791367 4791368 4791369 4791370 4791371 4791372 4791373 4791374 4791375 4791376 4791377 4791378 4791379 4791380 4791381 4791382 4791383 4791384 4791385 4791386 4791387 4791388 4791389 4791390 4791391 4791392 4791393 4791394 4791395 4791396 4791397 4791398 4791399 4791400 4791401 4791402 4791403 4791404 4791405 4791406 4791407 4791408 4791409 4791410 4791411 4791412 4791413 4791414 4791415 4791416 4791417 4791418 4791419 4791420 4791421 4791422 4791423 4791424 4791425 4791426 4791427 4791428 4791429 4791430 4791431 4791432 4791433 4791434 4791435 4791436 4791437 4791438 4791439 4791440 4791441 4791442 4791443 4791444 4791445 4791446 4791447 4791448 4791449 4791450 4791451 4791452 4791453 4791454 4791455 4791456 4791457 4791458 4791459 4791460 4791461 4791462 4791463 4791464 4791465 4791466 4791467 4791468 4791469 4791470 4791471 4791472 4791473 4791474 4791475 4791476 4791477 4791478 4791479 4791480 4791481 4791482 4791483 4791484 4791485 4791486 4791487 4791488 4791489 4791490 4791491 4791492 4791493 4791494 4791495 4791496 4791497 4791498 4791499 4791500 4791501 4791502 4791503 4791504 4791505 4791506 4791507 4791508 4791509 4791510 4791511 4791512 4791513 4791514 4791515 4791516 4791517 4791518 4791519 4791520 4791521 4791522 4791523 4791524 4791525 4791526 4791527 4791528 4791529 4791530 4791531 4791532 4791533 4791534 4791535 4791566 4791570 4791616 4791617 4791621 4791623 4791624 4791625 4791626 4791627 4791628 4791629 4791630 4791631 4791635 4791636 4795588 4798776 4798810 4842475 4846590 4847001 4847857 4861347 4861357 4861358 4861359 4861370 4861478 4861479 4861480 4861599 4861614 4861681 4861738 4861739 4861740 4861741 4861743 4861750 4861759 4861760 4861789 4861790 4868879 4870537 4870668 4870669 4870670 4874194 4874547 4874548 4874722 4876520 4877887 4878342 4879216 4879303 4879309 4879319 4880235 4880236 4880474 4880615 4880753 4881190 4881254 4882246 4882250 5336162 5336180 5336181 5338733 5338734 5338735 5338736 5339306 5341042 5341043 5341046 5341047 5342015 5342016 5343937 5343940 5344155 5344772 5352807 5352810 5352811 5352812 5352813 5352816 5353483 5353484 5353703 5353704 5353705 5353706 5353707 5353708 5353709 5353710 5353897 5353899 5353900 5353901 5355904 5355905 5355906 5355907 5356121 5356140 5356141 5356142 5356143 5356506 5360469 5362655 5362656 5362658 5364859 5364871 5364873 5364874 5364875 5364876 5364879 5365763 5365764 5365793 5366452 5366823 5367012 5367769 5373275 5375852 5375853 5375855 5375856 5375857 5375858 5375859 5376733 5376734 5376735 5376736 5378093 5378094 5378329 5378330 5378331 5378332 5378567 5378568 5378569 5378570 5378571 5378572 5378573 5379127 5379128 5379129 5379130 5379131 5379132 5379138 5379139 5379140 5379142 5379711 5379713 5379714 5379715 5379716 5379717 5379718 5379719 5379720 5379721 5379722 5379723 5379724 5379725 5379726 5379727 5379728 5379729 5379730 5379731 5379732 5379733 5379734 5379736 5379737 5379738 5379739 5379741 5382847 5394581 5394840 5395265 5395266 5396153 5396836 5396859 5396993 5396996 5396997 5402838 5403287 5403288 5403441 5403446 5403661 5403662 5404070 5404071 5404072 5404744 5404745 5404746 5404747 5404748 5404749 5407243 5407244 5407245 5407468 5408807 5409573 5410058 5410059 5411650 5411698 5412660 5412661 5412662 5415100 5415948 5415949 5415950 5416307 5417358 5417598 5417620 5418350 5418351 5418352 5418353 5418789 5418790 5418791 5418792 5418793 5418794 5422052 5422053 5422054 5422055 5422056 5422057 5422058 5422059 5422060 5422061 5422062 5434363 5434364 5434365 5434366 5434367 5434368 5434369 5434370 5434371 5434372 5435651 5435652 5435992 5436512 5436513 5436514 5436515 5436516 5436853 5436854 5436855 5436856 5436857 5436858 5436859 5436860 5436861 5436862 5436926 5437767 5437768 5438387 5438478 5438479 5438480 5438481 5438677 5438678 5438679 5440147 5441865 5441866 5441965 5441966 5441967 5441968 5441969 5441974 5441975 5442106 5442107 5443583 5443944 5444240 5444556 5444892 5444982 5445169 5445170 5445171 5445172 5445173 5445174 5445175 5445176 5445177 5445178 5445181 5445182 5445183 5445184 5445185 5445186 5445187 5445188 5445189 5445190 5445191 5445193 5445200 5445205 5445206 5445207 5445208 5445209 5445210 5445211 5445212 5445213 5445356 5445357 5445358 5445359 5445360 5445361 5445362 5445363 5445364 5445369 5445370 5445371 5445372 5445373 5445374 5445375 5446016 5446635 5446647 5446649 5446650 5446823 5446824 5447231 5448072 5448073 5448074 5448079 5448084 5448209 5448210 5448211 5448213 5448219 5448220 5448230 5448428 5448429 5448430 5448431 5448434 5448436 5448470 5449275 5449276 5449277 6000056 6000057 6000058], keep order:false, desc:false, N/A, N/A
差距比较明显。自己菜鸟一个,调试好久不知道问题在哪,感觉是跟IN条件太长了有关?但是现在业务上改动可能比较困难,有没有什么好的办法?
另外,有点不明白的是,执行计划中的时间都只有几十ms,但实际数据返回切切实实是花了1.3秒多的,网络环境上我可以确保是很好的,最终结果集也只有1MB不到,那额外的时间开销是花在哪里了呢?
【后续】:
这个问题在一个更长的IN(大约十万个)查询中找到原因了,tidb对于这么长的IN生成执行计划要花很久,这是真正慢的原因,实际查询时间是很短的(看下图)。
这个时间开销恰好是EXPLAIN ANALYZE不包含的。。。