SELECT 
  cscart_product_review_prepared_data.product_id AS product_id, 
  cscart_product_review_prepared_data.average_rating AS average_rating, 
  cscart_product_review_prepared_data.reviews_count AS reviews_count 
FROM 
  cscart_product_review_prepared_data 
WHERE 
  cscart_product_review_prepared_data.product_id IN (
    30818, 
    30395, 
    30374, 
    30287, 
    30566, 
    30313, 
    30434, 
    30242, 
    30499, 
    30164, 
    30304, 
    30432, 
    30542, 
    30165, 
    30397, 
    30495, 
    30483, 
    30564, 
    30445, 
    30209, 
    30221, 
    30577, 
    30473, 
    30392, 
    30557, 
    30450, 
    30516, 
    30606, 
    30349, 
    30362, 
    30595, 
    30599, 
    30102, 
    30213, 
    30422, 
    30573, 
    30100, 
    30312, 
    30521, 
    30338, 
    30344, 
    30437, 
    30536, 
    30578, 
    30339, 
    30508, 
    30212, 
    30474, 
    30195, 
    30311, 
    30352, 
    30183, 
    30138, 
    30149, 
    30451, 
    30162, 
    30447, 
    30228, 
    30576, 
    30163, 
    30288, 
    30452, 
    30526, 
    30188, 
    30270, 
    30205, 
    30532, 
    30423, 
    30193, 
    30457, 
    30272, 
    30317, 
    30113, 
    30194, 
    30216, 
    30315, 
    30453, 
    30314, 
    30335, 
    30545, 
    30431, 
    30235, 
    30438, 
    30501, 
    30475, 
    30220, 
    30318, 
    30407, 
    30513, 
    30559, 
    30265, 
    30468, 
    30108, 
    30290, 
    30370, 
    30170, 
    30360, 
    30405, 
    30342, 
    30570, 
    30404, 
    30455, 
    30561, 
    30616, 
    30190, 
    30281, 
    30328, 
    30329, 
    30294, 
    30394, 
    30406, 
    30246, 
    30343, 
    30409, 
    30219, 
    30222, 
    30425, 
    30439, 
    30135, 
    30184, 
    30186, 
    30196, 
    30302, 
    30139, 
    30189, 
    30273, 
    30380, 
    30167, 
    30393, 
    30126, 
    30416, 
    30543, 
    30340, 
    30408, 
    30553, 
    30386, 
    30390, 
    30589, 
    30148, 
    30322, 
    30470, 
    30492, 
    30177, 
    30207, 
    30478, 
    30613, 
    30227, 
    30400, 
    30309, 
    30463, 
    30558, 
    30156, 
    30208, 
    30245, 
    30579, 
    30620, 
    30560, 
    30137, 
    30154, 
    30299, 
    30341, 
    30348, 
    30602, 
    30609, 
    30255, 
    30454, 
    30621, 
    30192, 
    30198, 
    30243, 
    30308, 
    30391, 
    30612, 
    30498, 
    30563, 
    30610, 
    30618, 
    30241, 
    30263, 
    30114, 
    30257, 
    30398, 
    30441, 
    30489, 
    30519, 
    30574, 
    30580, 
    30625, 
    30375, 
    30379, 
    30411, 
    30446, 
    30592, 
    30615, 
    30623, 
    30158, 
    30161, 
    30300, 
    30357, 
    30476, 
    30584, 
    30176, 
    30320, 
    30456, 
    30460, 
    30461, 
    30565, 
    30588, 
    30591, 
    30601, 
    30112, 
    30175, 
    30197, 
    30337, 
    30487, 
    30104, 
    30110, 
    30316, 
    30421, 
    30522, 
    30231, 
    30429, 
    30440, 
    30617, 
    30099, 
    30152, 
    30179, 
    30168, 
    30262, 
    30286, 
    30403, 
    30442, 
    30567, 
    30569, 
    30597, 
    30605, 
    30614, 
    30092, 
    30418, 
    30562, 
    30581, 
    30244, 
    30279, 
    30292, 
    30310, 
    30330, 
    30554, 
    30583, 
    30586, 
    30458, 
    30459, 
    30153, 
    30214, 
    30331, 
    30171, 
    30232, 
    30297, 
    30353, 
    30480, 
    30568, 
    30347, 
    30350, 
    30366, 
    30503, 
    30624, 
    30098, 
    30141, 
    30364, 
    30410, 
    30424, 
    30469, 
    30530, 
    30551, 
    30585, 
    30619, 
    30247, 
    30256, 
    30399, 
    30412, 
    30511, 
    30172, 
    30203, 
    30252, 
    30266, 
    30464, 
    30479, 
    30598, 
    30334, 
    30383, 
    30387, 
    30402, 
    30467, 
    30510, 
    30608, 
    30103, 
    30301, 
    30507, 
    30523, 
    30107, 
    30115, 
    30116, 
    30142, 
    30169, 
    30199, 
    30206, 
    30111, 
    30120, 
    30224, 
    30254, 
    30280, 
    30305, 
    30202, 
    30283, 
    30396, 
    30433, 
    30502, 
    30524, 
    30128, 
    30389, 
    30611, 
    30151, 
    30275, 
    30471, 
    30531, 
    30552, 
    30607, 
    30260, 
    30327, 
    30106, 
    30182, 
    30204, 
    30226, 
    30230, 
    30274, 
    30278, 
    30285, 
    30346, 
    30377, 
    30512, 
    30529, 
    30571, 
    30465, 
    30105, 
    30200, 
    30361, 
    30354, 
    30359, 
    30443, 
    30514, 
    30269, 
    30117, 
    30218, 
    30368, 
    30382, 
    30372, 
    30518, 
    30417, 
    30504, 
    30587, 
    30140, 
    30150, 
    30180, 
    30181, 
    30217, 
    30264, 
    30277, 
    30321, 
    30240, 
    30215, 
    30271, 
    30101, 
    30427, 
    30477, 
    30500, 
    30155, 
    30259, 
    30378, 
    30324, 
    30159, 
    30178, 
    30234, 
    30355, 
    30462, 
    30261, 
    30109, 
    30494, 
    30282, 
    30157, 
    30326, 
    30535, 
    30537, 
    30118
  ) 
  AND cscart_product_review_prepared_data.storefront_id = 0

Query time 0.00172

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "274.41"
    },
    "table": {
      "table_name": "cscart_product_review_prepared_data",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY"
      ],
      "key": "PRIMARY",
      "used_key_parts": [
        "product_id",
        "storefront_id"
      ],
      "key_length": "7",
      "rows_examined_per_scan": 392,
      "rows_produced_per_join": 392,
      "filtered": "100.00",
      "index_condition": "((`cscartdb`.`cscart_product_review_prepared_data`.`storefront_id` = 0) and (`cscartdb`.`cscart_product_review_prepared_data`.`product_id` in (30818,30395,30374,30287,30566,30313,30434,30242,30499,30164,30304,30432,30542,30165,30397,30495,30483,30564,30445,30209,30221,30577,30473,30392,30557,30450,30516,30606,30349,30362,30595,30599,30102,30213,30422,30573,30100,30312,30521,30338,30344,30437,30536,30578,30339,30508,30212,30474,30195,30311,30352,30183,30138,30149,30451,30162,30447,30228,30576,30163,30288,30452,30526,30188,30270,30205,30532,30423,30193,30457,30272,30317,30113,30194,30216,30315,30453,30314,30335,30545,30431,30235,30438,30501,30475,30220,30318,30407,30513,30559,30265,30468,30108,30290,30370,30170,30360,30405,30342,30570,30404,30455,30561,30616,30190,30281,30328,30329,30294,30394,30406,30246,30343,30409,30219,30222,30425,30439,30135,30184,30186,30196,30302,30139,30189,30273,30380,30167,30393,30126,30416,30543,30340,30408,30553,30386,30390,30589,30148,30322,30470,30492,30177,30207,30478,30613,30227,30400,30309,30463,30558,30156,30208,30245,30579,30620,30560,30137,30154,30299,30341,30348,30602,30609,30255,30454,30621,30192,30198,30243,30308,30391,30612,30498,30563,30610,30618,30241,30263,30114,30257,30398,30441,30489,30519,30574,30580,30625,30375,30379,30411,30446,30592,30615,30623,30158,30161,30300,30357,30476,30584,30176,30320,30456,30460,30461,30565,30588,30591,30601,30112,30175,30197,30337,30487,30104,30110,30316,30421,30522,30231,30429,30440,30617,30099,30152,30179,30168,30262,30286,30403,30442,30567,30569,30597,30605,30614,30092,30418,30562,30581,30244,30279,30292,30310,30330,30554,30583,30586,30458,30459,30153,30214,30331,30171,30232,30297,30353,30480,30568,30347,30350,30366,30503,30624,30098,30141,30364,30410,30424,30469,30530,30551,30585,30619,30247,30256,30399,30412,30511,30172,30203,30252,30266,30464,30479,30598,30334,30383,30387,30402,30467,30510,30608,30103,30301,30507,30523,30107,30115,30116,30142,30169,30199,30206,30111,30120,30224,30254,30280,30305,30202,30283,30396,30433,30502,30524,30128,30389,30611,30151,30275,30471,30531,30552,30607,30260,30327,30106,30182,30204,30226,30230,30274,30278,30285,30346,30377,30512,30529,30571,30465,30105,30200,30361,30354,30359,30443,30514,30269,30117,30218,30368,30382,30372,30518,30417,30504,30587,30140,30150,30180,30181,30217,30264,30277,30321,30240,30215,30271,30101,30427,30477,30500,30155,30259,30378,30324,30159,30178,30234,30355,30462,30261,30109,30494,30282,30157,30326,30535,30537,30118)))",
      "cost_info": {
        "read_cost": "235.21",
        "eval_cost": "39.20",
        "prefix_cost": "274.41",
        "data_read_per_join": "6K"
      },
      "used_columns": [
        "product_id",
        "storefront_id",
        "average_rating",
        "reviews_count"
      ]
    }
  }
}