PgHero

Queries

Total Time Average Time Calls
6,891 min 39% 9 ms 47,841,824 odoo
SELECT "res_partner"."id" as "id", "res_partner"."name" as "name", "res_partner"."display_name" as "display_name", "res_partner"."date" as "date", "res_partner"."title" as "title", "res_partner"."parent_id" as "parent_id", "res_partner"."ref" as "ref", "res_partner"."lang" as "lang", "res_partner"."tz" as "tz", "res_partner"."vat" as "vat", "res_partner"."website" as "website", "res_partner"."comment" as "comment", "res_partner"."active" as "active", "res_partner"."employee" as "employee", "res_partner"."function" as "function", "res_partner"."type" as "type", "res_partner"."street" as "street", "res_partner"."street2" as "street2", "res_partner"."zip" as "zip", "res_partner"."mobile" as "mobile", "res_partner"."is_company" as "is_company", "res_partner"."industry_id" as "industry_id", "res_partner"."company_id" as "company_id", "res_partner"."color" as "color", "res_partner"."partner_share" as "partner_share", "res_partner"."commercial_partner_id" as "commercial_partner_id", "res_partner"."commercial_company_name" as "commercial_company_name", "res_partner"."company_name" as "company_name", "res_partner"."message_main_attachment_id" as "message_main_attachment_id", "res_partner"."email_normalized" as "email_normalized", "res_partner"."message_bounce" as "message_bounce", "res_partner"."email" as "email", "res_partner"."phone" as "phone", "res_partner"."user_id" as "user_id", "res_partner"."calendar_last_notif_ack" as "calendar_last_notif_ack", "res_partner"."plan_to_change_car" as "plan_to_change_car", "res_partner"."phone_sanitized" as "phone_sanitized", "res_partner"."debit_limit" as "debit_limit", "res_partner"."last_time_entries_checked" as "last_time_entries_checked", "res_partner"."invoice_warn" as "invoice_warn", "res_partner"."invoice_warn_msg" as "invoice_warn_msg", "res_partner"."supplier_rank" as "supplier_rank", "res_partner"."customer_rank" as "customer_rank", "res_partner"."team_id" as "team_id", "res_partner"."picking_warn" as "picking_warn", "res_partner"."picking_warn_msg" as "picking_warn_msg", COALESCE("res_partner__website_meta_title"."value", "res_partner"."website_meta_title") as "website_meta_title", COALESCE("res_partner__website_meta_description"."value", "res_partner"."website_meta_description") as "website_meta_description", COALESCE("res_partner__website_meta_keywords"."value", "res_partner"."website_meta_keywords") as "website_meta_keywords", "res_partner"."website_meta_og_img" as "website_meta_og_img", COALESCE("res_partner__seo_name"."value", "res_partner"."seo_name") as "seo_name", "res_partner"."website_id" as "website_id", "res_partner"."is_published" as "is_published", "res_partner"."purchase_warn" as "purchase_warn", "res_partner"."purchase_warn_msg" as "purchase_warn_msg", COALESCE("res_partner__website_short_description"."value", "res_partner"."website_short_description") as "website_short_description", "res_partner"."sale_warn" as "sale_warn", "res_partner"."sale_warn_msg" as "sale_warn_msg", "res_partner"."available_in_pos" as "available_in_pos", "res_partner"."whatsapp_number" as "whatsapp_number", "res_partner"."whatsapp_device_id" as "whatsapp_device_id", "res_partner"."city_id" as "city_id", "res_partner"."delivery_area_id" as "delivery_area_id", "res_partner"."city" as "city", "res_partner"."warning_type" as "warning_type", "res_partner"."name_arabic" as "name_arabic", "res_partner"."credit_limit_days" as "credit_limit_days", "res_partner"."partner_latitude" as "partner_latitude", "res_partner"."partner_longitude" as "partner_longitude", "res_partner"."credit_limit" as "credit_limit", "res_partner"."over_credit" as "over_credit", "res_partner"."makani_number" as "makani_number", "res_partner"."stat" as "stat", "res_partner"."rcs" as "rcs", "res_partner"."date_birth" as "date_birth", "res_partner"."relation" as "relation", "res_partner"."nationality_country_id" as "nationality_country_id", "res_partner"."verified" as "verified", "res_partner"."country_id" as "country_id", "res_partner"."receivable_user_id" as "receivable_user_id", "res_partner"."state_id" as "state_id", "res_partner"."partner_group_id" as "partner_group_id", "res_partner"."commercial_group_id" as "commercial_group_id", "res_partner"."tax_id_not_applicable" as "tax_id_not_applicable", "res_partner"."create_uid" as "create_uid", "res_partner"."create_date" as "create_date", "res_partner"."write_uid" as "write_uid", "res_partner"."write_date" as "write_date" FROM "res_partner" LEFT JOIN "ir_translation" AS "res_partner__website_meta_title" ON ("res_partner"."id" = "res_partner__website_meta_title"."res_id" AND "res_partner__website_meta_title"."type" = $1 AND "res_partner__website_meta_title"."name" = $2 AND "res_partner__website_meta_title"."lang" = $3 AND "res_partner__website_meta_title"."value" != $4) LEFT JOIN "ir_translation" AS "res_partner__website_meta_description" ON ("res_partner"."id" = "res_partner__website_meta_description"."res_id" AND "res_partner__website_meta_description"."type" = $5 AND "res_partner__website_meta_description"."name" = $6 AND "res_partner__website_meta_description"."lang" = $7 AND "res_partner__website_meta_description"."value" != $8) LEFT JOIN "ir_translation" AS "res_partner__website_meta_keywords" ON ("res_partner"."id" = "res_partner__website_meta_keywords"."res_id" AND "res_partner__website_meta_keywords"."type" = $9 AND "res_partner__website_meta_keywords"."name" = $10 AND "res_partner__website_meta_keywords"."lang" = $11 AND "res_partner__website_meta_keywords"."value" != $12) LEFT JOIN "ir_translation" AS "res_partner__seo_name" ON ("res_partner"."id" = "res_partner__seo_name"."res_id" AND "res_partner__seo_name"."type" = $13 AND "res_partner__seo_name"."name" = $14 AND "res_partner__seo_name"."lang" = $15 AND "res_partner__seo_name"."value" != $16) LEFT JOIN "ir_translation" AS "res_partner__website_short_description" ON ("res_partner"."id" = "res_partner__website_short_description"."res_id" AND "res_partner__website_short_description"."type" = $17 AND "res_partner__website_short_description"."name" = $18 AND "res_partner__website_short_description"."lang" = $19 AND "res_partner__website_short_description"."value" != $20) WHERE "res_partner".id IN ($21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664
5,105 min 29% 6 ms 50,829,530 odoo
SELECT
                U.partner_id as id,
                CASE WHEN max(B.last_poll) IS NULL THEN $1
                    WHEN age(now() AT TIME ZONE $2, max(B.last_poll)) > interval $3 THEN $4
                    WHEN age(now() AT TIME ZONE $5, max(B.last_presence)) > interval $6 THEN $7
                    ELSE $8
                END as status
            FROM bus_presence B
            RIGHT JOIN res_users U ON B.user_id = U.id
            WHERE U.partner_id IN ($9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005, $1006, $1007, $1008) AND U.active = $1009
         GROUP BY U.partner_id
1,388 min 8% 1 ms 56,367,624 odoo
SELECT res_users.partner_id FROM res_users
                            JOIN hr_leave ON hr_leave.user_id = res_users.id
                            AND state in ($1)
                            AND res_users.active = $2
                            AND date_from <= $3::timestamp AND date_to >= $4::timestamp
735 min 4% 8 ms 5,733,379 odoo
SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (("res_users"."share" IS NULL or "res_users"."share" = $1 ) AND ("res_users"."sale_team_id" in ($2))) ORDER BY  "res_users__partner_id"."name" ,"res_users"."login"
618 min 3% 21 ms 1,808,766 odoo
SELECT "res_users"."id" as "id", "res_users"."partner_id" as "partner_id", "res_users"."login" as "login", "res_users"."signature" as "signature", "res_users"."active" as "active", "res_users"."action_id" as "action_id", "res_users"."share" as "share", "res_users"."company_id" as "company_id", "res_users"."notification_type" as "notification_type", "res_users"."microsoft_calendar_token_validity" as "microsoft_calendar_token_validity", "res_users"."karma" as "karma", "res_users"."rank_id" as "rank_id", "res_users"."next_rank_id" as "next_rank_id", "res_users"."odoobot_state" as "odoobot_state", "res_users"."odoobot_failed" as "odoobot_failed", "res_users"."sale_team_id" as "sale_team_id", "res_users"."chatter_position" as "chatter_position", "res_users"."oauth_provider_id" as "oauth_provider_id", "res_users"."oauth_uid" as "oauth_uid", "res_users"."oauth_access_token" as "oauth_access_token", "res_users"."microsoft_calendar_sync_token" as "microsoft_calendar_sync_token", "res_users"."target_sales_won" as "target_sales_won", "res_users"."target_sales_done" as "target_sales_done", "res_users"."website_id" as "website_id", "res_users"."read_only" as "read_only", "res_users"."target_sales_invoiced" as "target_sales_invoiced", "res_users"."helpdesk_target_closed" as "helpdesk_target_closed", "res_users"."helpdesk_target_rating" as "helpdesk_target_rating", "res_users"."helpdesk_target_success" as "helpdesk_target_success", "res_users"."create_uid" as "create_uid", "res_users"."create_date" as "create_date", "res_users"."write_uid" as "write_uid", "res_users"."write_date" as "write_date" FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (("res_users"."share" IS NULL or "res_users"."share" = $1 ) OR 
                        EXISTS (
                            SELECT $2 FROM "res_company_users_rel" AS "res_users__company_ids"
                            WHERE "res_users__company_ids"."user_id" = "res_users".id
                            AND "res_users__company_ids"."cid" IN ($3)
                        )
                    ) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = $4 ) OR ("res_users__partner_id"."company_id" in ($5))) OR "res_users__partner_id"."company_id" IS NULL ) AND (((("res_users__partner_id"."type" != $6) OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL ) OR (("res_users__partner_id"."type" = $7) AND ("res_users__partner_id"."create_uid" = $8)))) AND "res_users".id IN ($9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005, $1006, $1007, $1008)
608 min 3% 20 ms 1,810,469 odoo
SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE ("res_users"."partner_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123,$124,$125,$126,$127,$128,$129,$130,$131,$132,$133,$134,$135,$136,$137,$138,$139,$140,$141,$142,$143,$144,$145,$146,$147,$148,$149,$150,$151,$152,$153,$154,$155,$156,$157,$158,$159,$160,$161,$162,$163,$164,$165,$166,$167,$168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179,$180,$181,$182,$183,$184,$185,$186,$187,$188,$189,$190,$191,$192,$193,$194,$195,$196,$197,$198,$199,$200,$201,$202,$203,$204,$205,$206,$207,$208,$209,$210,$211,$212,$213,$214,$215,$216,$217,$218,$219,$220,$221,$222,$223,$224,$225,$226,$227,$228,$229,$230,$231,$232,$233,$234,$235,$236,$237,$238,$239,$240,$241,$242,$243,$244,$245,$246,$247,$248,$249,$250,$251,$252,$253,$254,$255,$256,$257,$258,$259,$260,$261,$262,$263,$264,$265,$266,$267,$268,$269,$270,$271,$272,$273,$274,$275,$276,$277,$278,$279,$280,$281,$282,$283,$284,$285,$286,$287,$288,$289,$290,$291,$292,$293,$294,$295,$296,$297,$298,$299,$300,$301,$302,$303,$304,$305,$306,$307,$308,$309,$310,$311,$312,$313,$314,$315,$316,$317,$318,$319,$320,$321,$322,$323,$324,$325,$326,$327,$328,$329,$330,$331,$332,$333,$334,$335,$336,$337,$338,$339,$340,$341,$342,$343,$344,$345,$346,$347,$348,$349,$350,$351,$352,$353,$354,$355,$356,$357,$358,$359,$360,$361,$362,$363,$364,$365,$366,$367,$368,$369,$370,$371,$372,$373,$374,$375,$376,$377,$378,$379,$380,$381,$382,$383,$384,$385,$386,$387,$388,$389,$390,$391,$392,$393,$394,$395,$396,$397,$398,$399,$400,$401,$402,$403,$404,$405,$406,$407,$408,$409,$410,$411,$412,$413,$414,$415,$416,$417,$418,$419,$420,$421,$422,$423,$424,$425,$426,$427,$428,$429,$430,$431,$432,$433,$434,$435,$436,$437,$438,$439,$440,$441,$442,$443,$444,$445,$446,$447,$448,$449,$450,$451,$452,$453,$454,$455,$456,$457,$458,$459,$460,$461,$462,$463,$464,$465,$466,$467,$468,$469,$470,$471,$472,$473,$474,$475,$476,$477,$478,$479,$480,$481,$482,$483,$484,$485,$486,$487,$488,$489,$490,$491,$492,$493,$494,$495,$496,$497,$498,$499,$500,$501,$502,$503,$504,$505,$506,$507,$508,$509,$510,$511,$512,$513,$514,$515,$516,$517,$518,$519,$520,$521,$522,$523,$524,$525,$526,$527,$528,$529,$530,$531,$532,$533,$534,$535,$536,$537,$538,$539,$540,$541,$542,$543,$544,$545,$546,$547,$548,$549,$550,$551,$552,$553,$554,$555,$556,$557,$558,$559,$560,$561,$562,$563,$564,$565,$566,$567,$568,$569,$570,$571,$572,$573,$574,$575,$576,$577,$578,$579,$580,$581,$582,$583,$584,$585,$586,$587,$588,$589,$590,$591,$592,$593,$594,$595,$596,$597,$598,$599,$600,$601,$602,$603,$604,$605,$606,$607,$608,$609,$610,$611,$612,$613,$614,$615,$616,$617,$618,$619,$620,$621,$622,$623,$624,$625,$626,$627,$628,$629,$630,$631,$632,$633,$634,$635,$636,$637,$638,$639,$640,$641,$642,$643,$644,$645,$646,$647,$648,$649,$650,$651,$652,$653,$654,$655,$656,$657,$658,$659,$660,$661,$662,$663,$664,$665,$666,$667,$668,$669,$670,$671,$672,$673,$674,$675,$676,$677,$678,$679,$680,$681,$682,$683,$684,$685,$686,$687,$688,$689,$690,$691,$692,$693,$694,$695,$696,$697,$698,$699,$700,$701,$702,$703,$704,$705,$706,$707,$708,$709,$710,$711,$712,$713,$714,$715,$716,$717,$718,$719,$720,$721,$722,$723,$724,$725,$726,$727,$728,$729,$730,$731,$732,$733,$734,$735,$736,$737,$738,$739,$740,$741,$742,$743,$744,$745,$746,$747,$748,$749,$750,$751,$752,$753,$754,$755,$756,$757,$758,$759,$760,$761,$762,$763,$764,$765,$766,$767,$768,$769,$770,$771,$772,$773,$774,$775,$776,$777,$778,$779,$780,$781,$782,$783,$784,$785,$786,$787,$788,$789,$790,$791,$792,$793,$794,$795,$796,$797,$798,$799,$800,$801,$802,$803,$804,$805,$806,$807,$808,$809,$810,$811,$812,$813,$814,$815,$816,$817,$818,$819,$820,$821,$822,$823,$824,$825,$826,$827,$828,$829,$830,$831,$832,$833,$834,$835,$836,$837,$838,$839,$840,$841,$842,$843,$844,$845,$846,$847,$848,$849,$850,$851,$852,$853,$854,$855,$856,$857,$858,$859,$860,$861,$862,$863,$864,$865,$866,$867,$868,$869,$870,$871,$872,$873,$874,$875,$876,$877,$878,$879,$880,$881,$882,$883,$884,$885,$886,$887,$888,$889,$890,$891,$892,$893,$894,$895,$896,$897,$898,$899,$900,$901,$902,$903,$904,$905,$906,$907,$908,$909,$910,$911,$912,$913,$914,$915,$916,$917,$918,$919,$920,$921,$922,$923,$924,$925,$926,$927,$928,$929,$930,$931,$932,$933,$934,$935,$936,$937,$938,$939,$940,$941,$942,$943,$944,$945,$946,$947,$948,$949,$950,$951,$952,$953,$954,$955,$956,$957,$958,$959,$960,$961,$962,$963,$964,$965,$966,$967,$968,$969,$970,$971,$972,$973,$974,$975,$976,$977,$978,$979,$980,$981,$982,$983,$984,$985,$986,$987,$988,$989,$990,$991,$992,$993,$994,$995,$996,$997,$998,$999,$1000)) AND (("res_users"."share" IS NULL or "res_users"."share" = $1001 ) OR 
                        EXISTS (
                            SELECT $1002 FROM "res_company_users_rel" AS "res_users__company_ids"
                            WHERE "res_users__company_ids"."user_id" = "res_users".id
                            AND "res_users__company_ids"."cid" IN ($1003)
                        )
                    ) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = $1004 ) OR ("res_users__partner_id"."company_id" in ($1005))) OR "res_users__partner_id"."company_id" IS NULL ) AND (((("res_users__partner_id"."type" != $1006) OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL ) OR (("res_users__partner_id"."type" = $1007) AND ("res_users__partner_id"."create_uid" = $1008)))) ORDER BY  "res_users__partner_id"."name" ,"res_users"."login"
562 min 3% 53 ms 640,954 odoo
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."ref"::text like $1) AND ("account_move"."company_id" = $2)) AND (("account_move"."company_id" IS NULL  OR ("account_move"."company_id" in ($3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21))) AND (((("account_move"."company_id" IS NULL  OR ("account_move"."company_id" in ($22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40))) OR (("account_move"."move_type" in ($41,$42,$43,$44,$45)) AND (("account_move"."invoice_user_id" = $46) OR "account_move"."invoice_user_id" IS NULL ))) OR (("account_move"."move_type" in ($47,$48,$49,$50,$51)) AND ((("account_move"."team_id" in (SELECT "crm_team".id FROM "crm_team" WHERE ("crm_team"."id" IN (SELECT "sale_team_id" FROM "res_users" WHERE "id" IN ($52) AND "sale_team_id" IS NOT NULL)))) OR ("account_move"."team_id" in (SELECT "crm_team".id FROM "crm_team" WHERE ("crm_team"."id" not in (SELECT "sale_team_id" FROM "res_users" WHERE "sale_team_id" IS NOT NULL))))) OR $53))) OR ("account_move"."move_type" in ($54,$55,$56)))) ORDER BY  "account_move"."date" DESC,"account_move"."name" DESC,"account_move"."id" DESC
226 min 1% 3 ms 4,589,680 odoo
SELECT "account_payment".id FROM "account_payment" WHERE ("account_payment"."move_id" in ($1)) ORDER BY  "account_payment"."id"
Details
CREATE INDEX CONCURRENTLY ON account_payment (move_id)
Rows: 35079
Row progression: 35079, 1

Row estimates
- move_id (=): 1
- id (sort): 1

Existing indexes
- id PRIMARY
- message_main_attachment_id
222 min 1% 16 ms 810,874 odoo
SELECT "mail_followers".id FROM "mail_followers" WHERE (("mail_followers"."res_model" = $1) AND ("mail_followers"."partner_id" in (SELECT "res_partner".id FROM "res_partner" WHERE (("res_partner"."active" = $2) AND ("res_partner"."id" in ($3)))))) ORDER BY  "mail_followers"."id"
185 min 1% 4 ms 2,802,120 odoo
SELECT "mail_followers"."id" as "id", "mail_followers"."res_id" as "res_id" FROM "mail_followers" WHERE "mail_followers".id IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000)
Covered by index on (id)
Rows: 2676954
Row progression: 2676954, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- channel_id
- partner_id
- res_id
- res_model
- res_model, res_id, channel_id UNIQUE
- res_model, res_id, partner_id UNIQUE
163 min 0.9% 135 ms 72,658 odoo
SELECT max(id)
               FROM ir_attachment
              WHERE create_uid = $1
                AND url like $2
           GROUP BY name
           ORDER BY name
Details
CREATE INDEX CONCURRENTLY ON ir_attachment USING gist (url gist_trgm_ops)
Rows: 732741
Row progression: 732741, 56

Row estimates
- url (~~): 56
- create_uid (=): 4310
- name (sort): 24

Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- url
122 min 0.7% 9,041 ms 808 odoo
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in (SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ($1,$2)))) AND ("mail_message"."author_id" = $3)) AND ("mail_message"."res_id" != $4)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != $5) OR "mail_message"."message_type" IS NULL)) ORDER BY  "mail_message"."id" DESC  LIMIT $6
75 min 0.4% 13 ms 353,431 odoo
SELECT "mail_followers".id FROM "mail_followers" WHERE (("mail_followers"."res_model" = $1) AND ("mail_followers"."partner_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."id" in ($2))))) ORDER BY  "mail_followers"."id"
75 min 0.4% 0 ms 153,220,449 odoo
DISCARD ALL
60 min 0.3% 60 ms 60,702 odoo
SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123,$124,$125,$126,$127,$128,$129,$130,$131,$132,$133,$134,$135,$136,$137,$138,$139,$140,$141,$142,$143,$144,$145,$146,$147,$148,$149,$150,$151,$152,$153,$154,$155,$156,$157,$158,$159,$160,$161,$162,$163,$164,$165,$166,$167,$168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179,$180,$181,$182,$183,$184,$185,$186,$187,$188,$189,$190,$191,$192,$193,$194,$195,$196,$197,$198,$199,$200,$201,$202,$203,$204,$205,$206,$207,$208,$209,$210,$211,$212,$213,$214,$215,$216,$217,$218,$219,$220,$221,$222,$223,$224,$225,$226,$227,$228,$229,$230,$231,$232,$233,$234,$235,$236,$237,$238,$239,$240,$241,$242,$243,$244,$245,$246,$247,$248,$249,$250,$251,$252,$253,$254,$255,$256,$257,$258,$259,$260,$261,$262,$263,$264,$265,$266,$267,$268,$269,$270,$271,$272,$273,$274,$275,$276,$277,$278,$279,$280,$281,$282,$283,$284,$285,$286,$287,$288,$289,$290,$291,$292,$293,$294,$295,$296,$297,$298,$299,$300,$301,$302,$303,$304,$305,$306,$307,$308,$309,$310,$311,$312,$313,$314,$315,$316,$317,$318,$319,$320,$321,$322,$323,$324,$325,$326,$327,$328,$329,$330,$331,$332,$333,$334,$335,$336,$337,$338,$339,$340,$341,$342,$343,$344,$345,$346,$347,$348,$349,$350,$351,$352,$353,$354,$355,$356,$357,$358,$359,$360,$361,$362,$363,$364,$365,$366,$367,$368,$369,$370,$371,$372,$373,$374,$375,$376,$377,$378,$379,$380,$381,$382,$383,$384,$385,$386,$387,$388,$389,$390,$391,$392,$393,$394,$395,$396,$397,$398,$399,$400,$401,$402,$403,$404,$405,$406,$407,$408,$409,$410,$411,$412,$413,$414,$415,$416,$417,$418,$419,$420,$421,$422,$423,$424,$425,$426,$427,$428,$429,$430,$431,$432,$433,$434,$435,$436,$437,$438,$439,$440,$441,$442,$443,$444,$445,$446,$447,$448,$449,$450,$451,$452,$453,$454,$455,$456,$457,$458,$459,$460,$461,$462,$463,$464,$465,$466,$467,$468,$469,$470,$471,$472,$473,$474,$475,$476,$477,$478,$479,$480,$481,$482,$483,$484,$485,$486,$487,$488,$489,$490,$491,$492,$493,$494,$495,$496,$497,$498,$499,$500,$501,$502,$503,$504,$505,$506,$507,$508,$509,$510,$511,$512,$513,$514,$515,$516,$517,$518,$519,$520,$521,$522,$523,$524,$525,$526,$527,$528,$529,$530,$531,$532,$533,$534,$535,$536,$537,$538,$539,$540,$541,$542,$543,$544,$545,$546,$547,$548,$549,$550,$551,$552,$553,$554,$555,$556,$557,$558,$559,$560,$561,$562,$563,$564,$565,$566,$567,$568,$569,$570,$571,$572,$573,$574,$575,$576,$577,$578,$579,$580,$581,$582,$583,$584,$585,$586,$587,$588,$589,$590,$591,$592,$593,$594,$595,$596,$597,$598,$599,$600,$601,$602,$603,$604,$605,$606,$607,$608,$609,$610,$611,$612,$613,$614,$615,$616,$617,$618,$619,$620,$621,$622,$623,$624,$625,$626,$627,$628,$629,$630,$631,$632,$633,$634,$635,$636,$637,$638,$639,$640,$641,$642,$643,$644,$645,$646,$647,$648,$649,$650,$651,$652,$653,$654,$655,$656,$657,$658,$659,$660,$661,$662,$663,$664,$665,$666,$667,$668,$669,$670,$671,$672,$673,$674,$675,$676,$677,$678,$679,$680,$681,$682,$683,$684,$685,$686,$687,$688,$689,$690,$691,$692,$693,$694,$695,$696,$697,$698,$699,$700,$701,$702,$703,$704,$705,$706,$707,$708,$709,$710,$711,$712,$713,$714,$715,$716,$717,$718,$719,$720,$721,$722,$723,$724,$725,$726,$727,$728,$729,$730,$731,$732,$733,$734,$735,$736,$737,$738,$739,$740,$741,$742,$743,$744,$745,$746,$747,$748,$749,$750,$751,$752,$753,$754,$755,$756,$757,$758,$759,$760,$761,$762,$763,$764,$765,$766,$767,$768,$769,$770,$771,$772,$773,$774,$775,$776,$777,$778,$779,$780,$781,$782,$783,$784,$785,$786,$787,$788,$789,$790,$791,$792,$793,$794,$795,$796,$797,$798,$799,$800,$801,$802,$803,$804,$805,$806,$807,$808,$809,$810,$811,$812,$813,$814,$815,$816,$817,$818,$819,$820,$821,$822,$823,$824,$825,$826,$827,$828,$829,$830,$831,$832,$833,$834,$835,$836,$837,$838,$839,$840,$841,$842,$843,$844,$845,$846,$847,$848,$849,$850,$851,$852,$853,$854,$855,$856,$857,$858,$859,$860,$861,$862,$863,$864,$865,$866,$867,$868,$869,$870,$871,$872,$873,$874,$875,$876,$877,$878,$879,$880,$881,$882,$883,$884,$885,$886,$887,$888,$889,$890,$891,$892,$893,$894,$895,$896,$897,$898,$899,$900,$901,$902,$903,$904,$905,$906,$907,$908,$909,$910,$911,$912,$913,$914,$915,$916,$917,$918,$919,$920,$921,$922,$923,$924,$925,$926,$927,$928,$929,$930,$931,$932,$933,$934,$935,$936,$937,$938,$939,$940,$941,$942,$943,$944,$945,$946,$947,$948,$949,$950,$951,$952,$953,$954,$955,$956,$957,$958,$959,$960,$961,$962,$963,$964,$965,$966,$967,$968,$969,$970,$971,$972,$973,$974,$975,$976,$977,$978,$979,$980,$981,$982,$983,$984,$985,$986,$987,$988,$989,$990,$991,$992,$993,$994,$995,$996,$997,$998,$999,$1000,$1001,$1002,$1003,$1004,$1005,$1006,$1007,$1008,$1009,$1010,$1011,$1012,$1013,$1014,$1015,$1016,$1017,$1018,$1019,$1020,$1021,$1022,$1023,$1024,$1025,$1026,$1027,$1028,$1029,$1030,$1031,$1032,$1033,$1034,$1035,$1036,$1037,$1038,$1039,$1040,$1041,$1042,$1043,$1044,$1045,$1046,$1047,$1048,$1049,$1050,$1051,$1052,$1053,$1054,$1055,$1056,$1057,$1058,$1059,$1060,$1061,$1062,$1063,$1064,$1065,$1066,$1067,$1068,$1069,$1070,$1071,$1072,$1073,$1074,$1075,$1076,$1077,$1078,$1079,$1080,$1081,$1082,$1083,$1084,$1085,$1086,$1087,$1088,$1089,$1090,$1091,$1092,$1093,$1094,$1095,$1096,$1097,$1098,$1099,$1100,$1101,$1102,$1103,$1104,$1105,$1106,$1107,$1108,$1109,$1110,$1111,$1112,$1113,$1114,$1115,$1116,$1117,$1118,$1119,$1120,$1121,$1122,$1123,$1124,$1125,$1126,$1127,$1128,$1129,$1130,$1131,$1132,$1133,$1134,$1135,$1136,$1137,$1138,$1139,$1140,$1141,$1142,$1143,$1144,$1145,$1146,$1147,$1148,$1149,$1150,$1151,$1152,$1153,$1154,$1155,$1156,$1157,$1158,$1159,$1160,$1161,$1162,$1163,$1164,$1165,$1166,$1167,$1168,$1169,$1170,$1171,$1172,$1173,$1174,$1175,$1176,$1177,$1178,$1179,$1180,$1181,$1182,$1183,$1184,$1185,$1186,$1187,$1188,$1189,$1190,$1191,$1192,$1193,$1194,$1195,$1196,$1197,$1198,$1199,$1200,$1201,$1202,$1203,$1204,$1205,$1206,$1207,$1208,$1209,$1210,$1211,$1212,$1213,$1214,$1215,$1216,$1217,$1218,$1219,$1220,$1221,$1222,$1223,$1224,$1225,$1226,$1227,$1228,$1229,$1230,$1231,$1232,$1233,$1234,$1235,$1236,$1237,$1238,$1239,$1240,$1241,$1242,$1243,$1244,$1245,$1246,$1247,$1248,$1249,$1250,$1251,$1252,$1253,$1254,$1255,$1256,$1257,$1258,$1259,$1260,$1261,$1262,$1263,$1264,$1265,$1266,$1267,$1268,$1269,$1270,$1271,$1272,$1273,$1274,$1275,$1276,$1277,$1278,$1279,$1280,$1281,$1282,$1283,$1284,$1285,$1286,$1287,$1288,$1289,$1290,$1291,$1292,$1293,$1294,$1295,$1296,$1297,$1298,$1299,$1300,$1301,$1302,$1303,$1304,$1305,$1306,$1307,$1308,$1309,$1310,$1311,$1312,$1313,$1314,$1315,$1316,$1317,$1318,$1319,$1320,$1321,$1322,$1323,$1324,$1325,$1326,$1327,$1328,$1329,$1330,$1331,$1332,$1333,$1334,$1335,$1336,$1337,$1338,$1339,$1340,$1341,$1342,$1343,$1344,$1345,$1346,$1347,$1348,$1349,$1350,$1351,$1352,$1353,$1354,$1355,$1356,$1357,$1358,$1359,$1360,$1361,$1362,$1363,$1364,$1365,$1366,$1367,$1368,$1369,$1370,$1371,$1372,$1373,$1374,$1375,$1376,$1377,$1378,$1379,$1380,$1381,$1382,$1383,$1384,$1385,$1386,$1387,$1388,$1389,$1390,$1391,$1392,$1393,$1394,$1395,$1396,$1397,$1398,$1399,$1400,$1401,$1402,$1403,$1404,$1405,$1406,$1407,$1408,$1409,$1410,$1411,$1412,$1413,$1414,$1415,$1416,$1417,$1418,$1419,$1420,$1421,$1422,$1423,$1424,$1425,$1426,$1427,$1428,$1429,$1430,$1431,$1432,$1433,$1434,$1435,$1436,$1437,$1438,$1439,$1440,$1441,$1442,$1443,$1444,$1445,$1446,$1447,$1448,$1449,$1450,$1451,$1452,$1453,$1454,$1455,$1456,$1457,$1458,$1459,$1460,$1461,$1462,$1463,$1464,$1465,$1466,$1467,$1468,$1469,$1470,$1471,$1472,$1473,$1474,$1475,$1476,$1477,$1478,$1479,$1480,$1481,$1482,$1483,$1484,$1485,$1486,$1487,$1488,$1489,$1490,$1491,$1492,$1493,$1494,$1495,$1496,$1497,$1498,$1499,$1500,$1501,$1502,$1503,$1504,$1505,$1506,$1507,$1508,$1509,$1510,$1511,$1512,$1513,$1514,$1515,$1516,$1517,$1518,$1519,$1520,$1521,$1522,$1523,$1524,$1525,$1526,$1527,$1528,$1529,$1530,$1531,$1532,$1533,$1534,$1535,$1536,$1537,$1538,$1539,$1540,$1541,$1542,$1543,$1544,$1545,$1546,$1547,$1548,$1549,$1550,$1551,$1552,$1553,$1554,$1555,$1556,$1557,$1558,$1559,$1560,$1561,$1562,$1563,$1564,$1565,$1566,$1567,$1568,$1569,$1570,$1571,$1572,$1573,$1574,$1575,$1576,$1577,$1578,$1579,$1580,$1581,$1582,$1583,$1584,$1585,$1586,$1587,$1588,$1589,$1590,$1591,$1592,$1593,$1594,$1595,$1596,$1597,$1598,$1599,$1600,$1601,$1602,$1603,$1604,$1605,$1606,$1607,$1608,$1609,$1610,$1611,$1612,$1613,$1614,$1615,$1616,$1617,$1618,$1619,$1620,$1621,$1622,$1623,$1624,$1625,$1626,$1627,$1628,$1629,$1630,$1631,$1632,$1633,$1634,$1635,$1636,$1637,$1638,$1639,$1640,$1641,$1642,$1643,$1644,$1645,$1646,$1647,$1648,$1649,$1650,$1651,$1652,$1653,$1654,$1655,$1656,$1657,$1658,$1659,$1660,$1661,$1662,$1663,$1664,$1665,$1666,$1667,$1668,$1669,$1670,$1671,$1672,$1673,$1674,$1675,$1676,$1677,$1678,$1679,$1680,$1681,$1682,$1683,$1684,$1685,$1686,$1687,$1688,$1689,$1690,$1691,$1692,$1693,$1694,$1695,$1696,$1697,$1698,$1699,$1700,$1701,$1702,$1703,$1704,$1705,$1706,$1707,$1708,$1709,$1710,$1711,$1712,$1713,$1714,$1715,$1716,$1717,$1718,$1719,$1720,$1721,$1722,$1723,$1724,$1725,$1726,$1727,$1728,$1729,$1730,$1731,$1732,$1733,$1734,$1735,$1736,$1737,$1738,$1739,$1740,$1741,$1742,$1743,$1744,$1745,$1746,$1747,$1748,$1749,$1750,$1751,$1752,$1753,$1754,$1755,$1756,$1757,$1758,$1759,$1760,$1761,$1762,$1763,$1764,$1765,$1766,$1767,$1768,$1769,$1770,$1771,$1772,$1773,$1774,$1775,$1776,$1777,$1778,$1779,$1780,$1781,$1782,$1783,$1784,$1785,$1786,$1787,$1788,$1789,$1790,$1791,$1792,$1793,$1794,$1795,$1796,$1797,$1798,$1799,$1800,$1801,$1802,$1803,$1804,$1805,$1806,$1807,$1808,$1809,$1810,$1811,$1812,$1813,$1814,$1815,$1816,$1817,$1818,$1819,$1820,$1821,$1822,$1823,$1824,$1825,$1826,$1827,$1828,$1829,$1830,$1831,$1832,$1833,$1834,$1835,$1836,$1837,$1838,$1839,
33 min 0.2% 2 ms 940,924 odoo
SELECT "ir_ui_view".id FROM "ir_ui_view" LEFT JOIN "website" AS "ir_ui_view__website_id" ON ("ir_ui_view"."website_id" = "ir_ui_view__website_id"."id") WHERE (("ir_ui_view"."active" = $1) AND (("ir_ui_view"."key" = $2) AND (("ir_ui_view"."website_id" in ($3)) OR "ir_ui_view"."website_id" IS NULL))) ORDER BY  "ir_ui_view__website_id"."id"   LIMIT $4
33 min 0.2% 3 ms 654,486 odoo
SELECT "mail_channel_partner"."id" as "id", "mail_channel_partner"."custom_channel_name" as "custom_channel_name", "mail_channel_partner"."partner_id" as "partner_id", "mail_channel_partner"."channel_id" as "channel_id", "mail_channel_partner"."fetched_message_id" as "fetched_message_id", "mail_channel_partner"."seen_message_id" as "seen_message_id", "mail_channel_partner"."fold_state" as "fold_state", "mail_channel_partner"."is_minimized" as "is_minimized", "mail_channel_partner"."is_pinned" as "is_pinned", "mail_channel_partner"."create_uid" as "create_uid", "mail_channel_partner"."create_date" as "create_date", "mail_channel_partner"."write_uid" as "write_uid", "mail_channel_partner"."write_date" as "write_date" FROM "mail_channel_partner" WHERE "mail_channel_partner".id IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000)
Covered by index on (id)
Rows: 12479
Row progression: 12479, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- channel_id, partner_id, seen_message_id
32 min 0.2% 0 ms 6,010,536 odoo
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ((("ir_attachment"."res_model" = $1) AND ("ir_attachment"."res_field" = $2)) AND ("ir_attachment"."res_id" in ($3))) ORDER BY  "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (res_id)
Rows: 732741
Row progression: 732741, 7

Row estimates
- res_id (=): 7
- res_model (=): 14652
- res_field (=): 26097
- id (sort): 1

Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- url
29 min 0.2% 0 ms 17,638,194 odoo
SELECT r.id FROM ir_rule r JOIN ir_model m ON (r.model_id=m.id)
                    WHERE m.model=$1 AND r.active AND r.perm_read
                    AND (r.id IN (SELECT rule_group_id FROM rule_group_rel rg
                                  JOIN res_groups_users_rel gu ON (rg.group_id=gu.gid)
                                  WHERE gu.uid=$2)
                         OR r.global)
                    ORDER BY r.id
29 min 0.2% 0 ms 6,153,682 odoo
SELECT "ir_attachment"."id" as "id", "ir_attachment"."name" as "name", "ir_attachment"."description" as "description", "ir_attachment"."res_model" as "res_model", "ir_attachment"."res_field" as "res_field", "ir_attachment"."res_id" as "res_id", "ir_attachment"."company_id" as "company_id", "ir_attachment"."type" as "type", "ir_attachment"."url" as "url", "ir_attachment"."public" as "public", "ir_attachment"."access_token" as "access_token", "ir_attachment"."store_fname" as "store_fname", "ir_attachment"."file_size" as "file_size", "ir_attachment"."checksum" as "checksum", "ir_attachment"."mimetype" as "mimetype", "ir_attachment"."original_id" as "original_id", "ir_attachment"."website_id" as "website_id", "ir_attachment"."key" as "key", "ir_attachment"."theme_template_id" as "theme_template_id", "ir_attachment"."create_uid" as "create_uid", "ir_attachment"."create_date" as "create_date", "ir_attachment"."write_uid" as "write_uid", "ir_attachment"."write_date" as "write_date" FROM "ir_attachment" WHERE "ir_attachment".id IN ($1)
Covered by index on (id)
Rows: 732741
Row progression: 732741, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- url
25 min 0.1% 6 ms 232,390 odoo
SELECT "hr_payroll_bulletin"."id" as "id", "hr_payroll_bulletin"."name" as "name", "hr_payroll_bulletin"."date_salary" as "date_salary", "hr_payroll_bulletin"."employee_id" as "employee_id", "hr_payroll_bulletin"."employee_contract_id" as "employee_contract_id", "hr_payroll_bulletin"."payrun_id" as "payrun_id", "hr_payroll_bulletin"."salaire_base" as "salaire_base", "hr_payroll_bulletin"."normal_hours" as "normal_hours", "hr_payroll_bulletin"."overtime_hours" as "overtime_hours", "hr_payroll_bulletin"."absences" as "absences", "hr_payroll_bulletin"."cash" as "cash", "hr_payroll_bulletin"."normal" as "normal", "hr_payroll_bulletin"."hs_extra" as "hs_extra", "hr_payroll_bulletin"."hs_sunday" as "hs_sunday", "hr_payroll_bulletin"."hs_ferie" as "hs_ferie", "hr_payroll_bulletin"."nuit" as "nuit", "hr_payroll_bulletin"."nuit_ferie" as "nuit_ferie", "hr_payroll_bulletin"."nuit_sunday" as "nuit_sunday", "hr_payroll_bulletin"."work_company_id" as "work_company_id", "hr_payroll_bulletin"."company_id" as "company_id", "hr_payroll_bulletin"."hour_base" as "hour_base", "hr_payroll_bulletin"."comment" as "comment", "hr_payroll_bulletin"."salaire" as "salaire", "hr_payroll_bulletin"."salaire_brute" as "salaire_brute", "hr_payroll_bulletin"."salaire_brute_imposable" as "salaire_brute_imposable", "hr_payroll_bulletin"."salaire_net" as "salaire_net", "hr_payroll_bulletin"."salaire_net_a_payer" as "salaire_net_a_payer", "hr_payroll_bulletin"."salaire_net_imposable" as "salaire_net_imposable", "hr_payroll_bulletin"."cotisations_employee" as "cotisations_employee", "hr_payroll_bulletin"."cotisations_employer" as "cotisations_employer", "hr_payroll_bulletin"."igr" as "igr", "hr_payroll_bulletin"."ir_brut" as "ir_brut", "hr_payroll_bulletin"."prime" as "prime", "hr_payroll_bulletin"."indemnite" as "indemnite", "hr_payroll_bulletin"."avantage" as "avantage", "hr_payroll_bulletin"."exoneration" as "exoneration", "hr_payroll_bulletin"."deduction" as "deduction", "hr_payroll_bulletin"."permanent_increment" as "permanent_increment", "hr_payroll_bulletin"."non_permanent_increment" as "non_permanent_increment", "hr_payroll_bulletin"."unpaid_leaves" as "unpaid_leaves", "hr_payroll_bulletin"."paid_leaves" as "paid_leaves", "hr_payroll_bulletin"."working_days" as "working_days", "hr_payroll_bulletin"."net_working_days" as "net_working_days", "hr_payroll_bulletin"."prime_anciennete" as "prime_anciennete", "hr_payroll_bulletin"."frais_pro" as "frais_pro", "hr_payroll_bulletin"."personnes" as "personnes", "hr_payroll_bulletin"."absence" as "absence", "hr_payroll_bulletin"."arrondi" as "arrondi", "hr_payroll_bulletin"."logement" as "logement", "hr_payroll_bulletin"."previous_payslip_id" as "previous_payslip_id", "hr_payroll_bulletin"."previous_salaire_net" as "previous_salaire_net", "hr_payroll_bulletin"."previous_arrondi" as "previous_arrondi", "hr_payroll_bulletin"."wps_report_id" as "wps_report_id", "hr_payroll_bulletin"."flight_paid_date" as "flight_paid_date", "hr_payroll_bulletin"."provision_move_id" as "provision_move_id", "hr_payroll_bulletin"."wagecard" as "wagecard", "hr_payroll_bulletin"."division_id" as "division_id", "hr_payroll_bulletin"."create_uid" as "create_uid", "hr_payroll_bulletin"."create_date" as "create_date", "hr_payroll_bulletin"."write_uid" as "write_uid", "hr_payroll_bulletin"."write_date" as "write_date" FROM "hr_payroll_bulletin" WHERE $1 AND "hr_payroll_bulletin".id IN ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001)
24 min 0.1% 0 ms 28,807,810 odoo
SELECT MAX(CASE WHEN perm_read THEN $1 ELSE $2 END)
                              FROM ir_model_access a
                              JOIN ir_model m ON (m.id = a.model_id)
                              JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)
                             WHERE m.model = $3
                               AND gu.uid = $4
                               AND a.active IS TRUE
22 min 0.1% 3 ms 520,714 odoo
SELECT "hr_payroll_bulletin"."id" as "id", "hr_payroll_bulletin"."payrun_id" as "payrun_id" FROM "hr_payroll_bulletin" WHERE $1 AND "hr_payroll_bulletin".id IN ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001)
19 min 0.1% 45 ms 24,520 odoo
SELECT "purchase_requisition_line".id FROM "purchase_requisition_line" WHERE ("purchase_requisition_line"."requisition_id" in ($1)) AND ("purchase_requisition_line"."company_id" IS NULL  OR ("purchase_requisition_line"."company_id" in ($2))) ORDER BY  "purchase_requisition_line"."id"
16 min < 0.1% 24 ms 39,715 odoo
SELECT "hr_employee".id FROM "hr_employee" WHERE ((("hr_employee"."active" = $1) AND "hr_employee"."contract_id" IS NOT NULL) AND (("hr_employee"."allocation_month" != $2) OR "hr_employee"."allocation_month" IS NULL)) AND ("hr_employee"."company_id" IS NULL  OR ("hr_employee"."company_id" in ($3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21))) ORDER BY  "hr_employee"."code"   LIMIT $22
15 min < 0.1% 0 ms 103,634,351 odoo
BEGIN ISOLATION LEVEL REPEATABLE READ
15 min < 0.1% 0 ms 46,890,517 odoo
SELECT base_registry_signaling.last_value,
                                  base_cache_signaling.last_value
                           FROM base_registry_signaling, base_cache_signaling
13 min < 0.1% 0 ms 9,591,366 odoo
SELECT "ir_ui_view"."id" as "id", "ir_ui_view"."name" as "name", "ir_ui_view"."model" as "model", "ir_ui_view"."key" as "key", "ir_ui_view"."priority" as "priority", "ir_ui_view"."arch_fs" as "arch_fs", "ir_ui_view"."arch_updated" as "arch_updated", "ir_ui_view"."arch_prev" as "arch_prev", "ir_ui_view"."inherit_id" as "inherit_id", "ir_ui_view"."field_parent" as "field_parent", "ir_ui_view"."mode" as "mode", "ir_ui_view"."active" as "active", "ir_ui_view"."type" as "type", "ir_ui_view"."customize_show" as "customize_show", COALESCE("ir_ui_view__website_meta_title"."value", "ir_ui_view"."website_meta_title") as "website_meta_title", COALESCE("ir_ui_view__website_meta_description"."value", "ir_ui_view"."website_meta_description") as "website_meta_description", COALESCE("ir_ui_view__website_meta_keywords"."value", "ir_ui_view"."website_meta_keywords") as "website_meta_keywords", "ir_ui_view"."website_meta_og_img" as "website_meta_og_img", COALESCE("ir_ui_view__seo_name"."value", "ir_ui_view"."seo_name") as "seo_name", "ir_ui_view"."website_id" as "website_id", "ir_ui_view"."track" as "track", "ir_ui_view"."visibility" as "visibility", "ir_ui_view"."theme_template_id" as "theme_template_id", "ir_ui_view"."create_uid" as "create_uid", "ir_ui_view"."create_date" as "create_date", "ir_ui_view"."write_uid" as "write_uid", "ir_ui_view"."write_date" as "write_date" FROM "ir_ui_view" LEFT JOIN "ir_translation" AS "ir_ui_view__website_meta_title" ON ("ir_ui_view"."id" = "ir_ui_view__website_meta_title"."res_id" AND "ir_ui_view__website_meta_title"."type" = $1 AND "ir_ui_view__website_meta_title"."name" = $2 AND "ir_ui_view__website_meta_title"."lang" = $3 AND "ir_ui_view__website_meta_title"."value" != $4) LEFT JOIN "ir_translation" AS "ir_ui_view__website_meta_description" ON ("ir_ui_view"."id" = "ir_ui_view__website_meta_description"."res_id" AND "ir_ui_view__website_meta_description"."type" = $5 AND "ir_ui_view__website_meta_description"."name" = $6 AND "ir_ui_view__website_meta_description"."lang" = $7 AND "ir_ui_view__website_meta_description"."value" != $8) LEFT JOIN "ir_translation" AS "ir_ui_view__website_meta_keywords" ON ("ir_ui_view"."id" = "ir_ui_view__website_meta_keywords"."res_id" AND "ir_ui_view__website_meta_keywords"."type" = $9 AND "ir_ui_view__website_meta_keywords"."name" = $10 AND "ir_ui_view__website_meta_keywords"."lang" = $11 AND "ir_ui_view__website_meta_keywords"."value" != $12) LEFT JOIN "ir_translation" AS "ir_ui_view__seo_name" ON ("ir_ui_view"."id" = "ir_ui_view__seo_name"."res_id" AND "ir_ui_view__seo_name"."type" = $13 AND "ir_ui_view__seo_name"."name" = $14 AND "ir_ui_view__seo_name"."lang" = $15 AND "ir_ui_view__seo_name"."value" != $16) WHERE "ir_ui_view".id IN ($17)
12 min < 0.1% 0 ms 11,497,410 odoo
SELECT "res_partner"."id" as "id", "res_partner"."name" as "name", "res_partner"."display_name" as "display_name", "res_partner"."date" as "date", "res_partner"."title" as "title", "res_partner"."parent_id" as "parent_id", "res_partner"."ref" as "ref", "res_partner"."lang" as "lang", "res_partner"."tz" as "tz", "res_partner"."vat" as "vat", "res_partner"."website" as "website", "res_partner"."comment" as "comment", "res_partner"."active" as "active", "res_partner"."employee" as "employee", "res_partner"."function" as "function", "res_partner"."type" as "type", "res_partner"."street" as "street", "res_partner"."street2" as "street2", "res_partner"."zip" as "zip", "res_partner"."mobile" as "mobile", "res_partner"."is_company" as "is_company", "res_partner"."industry_id" as "industry_id", "res_partner"."company_id" as "company_id", "res_partner"."color" as "color", "res_partner"."partner_share" as "partner_share", "res_partner"."commercial_partner_id" as "commercial_partner_id", "res_partner"."commercial_company_name" as "commercial_company_name", "res_partner"."company_name" as "company_name", "res_partner"."message_main_attachment_id" as "message_main_attachment_id", "res_partner"."email_normalized" as "email_normalized", "res_partner"."message_bounce" as "message_bounce", "res_partner"."email" as "email", "res_partner"."phone" as "phone", "res_partner"."user_id" as "user_id", "res_partner"."calendar_last_notif_ack" as "calendar_last_notif_ack", "res_partner"."plan_to_change_car" as "plan_to_change_car", "res_partner"."phone_sanitized" as "phone_sanitized", "res_partner"."debit_limit" as "debit_limit", "res_partner"."last_time_entries_checked" as "last_time_entries_checked", "res_partner"."invoice_warn" as "invoice_warn", "res_partner"."invoice_warn_msg" as "invoice_warn_msg", "res_partner"."supplier_rank" as "supplier_rank", "res_partner"."customer_rank" as "customer_rank", "res_partner"."team_id" as "team_id", "res_partner"."picking_warn" as "picking_warn", "res_partner"."picking_warn_msg" as "picking_warn_msg", COALESCE("res_partner__website_meta_title"."value", "res_partner"."website_meta_title") as "website_meta_title", COALESCE("res_partner__website_meta_description"."value", "res_partner"."website_meta_description") as "website_meta_description", COALESCE("res_partner__website_meta_keywords"."value", "res_partner"."website_meta_keywords") as "website_meta_keywords", "res_partner"."website_meta_og_img" as "website_meta_og_img", COALESCE("res_partner__seo_name"."value", "res_partner"."seo_name") as "seo_name", "res_partner"."website_id" as "website_id", "res_partner"."is_published" as "is_published", "res_partner"."purchase_warn" as "purchase_warn", "res_partner"."purchase_warn_msg" as "purchase_warn_msg", COALESCE("res_partner__website_short_description"."value", "res_partner"."website_short_description") as "website_short_description", "res_partner"."sale_warn" as "sale_warn", "res_partner"."sale_warn_msg" as "sale_warn_msg", "res_partner"."available_in_pos" as "available_in_pos", "res_partner"."whatsapp_number" as "whatsapp_number", "res_partner"."whatsapp_device_id" as "whatsapp_device_id", "res_partner"."city_id" as "city_id", "res_partner"."delivery_area_id" as "delivery_area_id", "res_partner"."city" as "city", "res_partner"."warning_type" as "warning_type", "res_partner"."name_arabic" as "name_arabic", "res_partner"."credit_limit_days" as "credit_limit_days", "res_partner"."partner_latitude" as "partner_latitude", "res_partner"."partner_longitude" as "partner_longitude", "res_partner"."credit_limit" as "credit_limit", "res_partner"."over_credit" as "over_credit", "res_partner"."makani_number" as "makani_number", "res_partner"."stat" as "stat", "res_partner"."rcs" as "rcs", "res_partner"."date_birth" as "date_birth", "res_partner"."relation" as "relation", "res_partner"."nationality_country_id" as "nationality_country_id", "res_partner"."verified" as "verified", "res_partner"."country_id" as "country_id", "res_partner"."receivable_user_id" as "receivable_user_id", "res_partner"."state_id" as "state_id", "res_partner"."partner_group_id" as "partner_group_id", "res_partner"."commercial_group_id" as "commercial_group_id", "res_partner"."tax_id_not_applicable" as "tax_id_not_applicable", "res_partner"."create_uid" as "create_uid", "res_partner"."create_date" as "create_date", "res_partner"."write_uid" as "write_uid", "res_partner"."write_date" as "write_date" FROM "res_partner" LEFT JOIN "ir_translation" AS "res_partner__website_meta_title" ON ("res_partner"."id" = "res_partner__website_meta_title"."res_id" AND "res_partner__website_meta_title"."type" = $1 AND "res_partner__website_meta_title"."name" = $2 AND "res_partner__website_meta_title"."lang" = $3 AND "res_partner__website_meta_title"."value" != $4) LEFT JOIN "ir_translation" AS "res_partner__website_meta_description" ON ("res_partner"."id" = "res_partner__website_meta_description"."res_id" AND "res_partner__website_meta_description"."type" = $5 AND "res_partner__website_meta_description"."name" = $6 AND "res_partner__website_meta_description"."lang" = $7 AND "res_partner__website_meta_description"."value" != $8) LEFT JOIN "ir_translation" AS "res_partner__website_meta_keywords" ON ("res_partner"."id" = "res_partner__website_meta_keywords"."res_id" AND "res_partner__website_meta_keywords"."type" = $9 AND "res_partner__website_meta_keywords"."name" = $10 AND "res_partner__website_meta_keywords"."lang" = $11 AND "res_partner__website_meta_keywords"."value" != $12) LEFT JOIN "ir_translation" AS "res_partner__seo_name" ON ("res_partner"."id" = "res_partner__seo_name"."res_id" AND "res_partner__seo_name"."type" = $13 AND "res_partner__seo_name"."name" = $14 AND "res_partner__seo_name"."lang" = $15 AND "res_partner__seo_name"."value" != $16) LEFT JOIN "ir_translation" AS "res_partner__website_short_description" ON ("res_partner"."id" = "res_partner__website_short_description"."res_id" AND "res_partner__website_short_description"."type" = $17 AND "res_partner__website_short_description"."name" = $18 AND "res_partner__website_short_description"."lang" = $19 AND "res_partner__website_short_description"."value" != $20) WHERE "res_partner".id IN ($21)
12 min < 0.1% 0 ms 5,426,148 odoo
SELECT res_groups_users_rel.uid, res_groups_users_rel.gid FROM res_groups_users_rel, "res_groups" LEFT JOIN "ir_translation" AS "res_groups__name" ON ("res_groups"."id" = "res_groups__name"."res_id" AND "res_groups__name"."type" = $1 AND "res_groups__name"."name" = $2 AND "res_groups__name"."lang" = $3 AND "res_groups__name"."value" != $4)
                    WHERE $5=$6 AND res_groups_users_rel.uid IN ($7) AND res_groups_users_rel.gid = res_groups.id
                     ORDER BY COALESCE("res_groups__name"."value", "res_groups"."name")    OFFSET $8
12 min < 0.1% 0 ms 1,842,573 odoo
SELECT "ir_model_fields".id FROM "ir_model_fields" WHERE ("ir_model_fields"."model" = $1) ORDER BY  "ir_model_fields"."name"
Covered by index on (model, name)
Rows: 17511
Row progression: 17511, 21

Row estimates
- model (=): 21
- name (sort): 4

Existing indexes
- id PRIMARY
- complete_name
- model, name UNIQUE
- model_id
- name
- state
- website_form_blacklisted
11 min < 0.1% 0 ms 21,518,505 odoo
SELECT "res_users"."id" as "id", "res_users"."partner_id" as "partner_id", "res_users"."login" as "login", "res_users"."signature" as "signature", "res_users"."active" as "active", "res_users"."action_id" as "action_id", "res_users"."share" as "share", "res_users"."company_id" as "company_id", "res_users"."notification_type" as "notification_type", "res_users"."microsoft_calendar_token_validity" as "microsoft_calendar_token_validity", "res_users"."karma" as "karma", "res_users"."rank_id" as "rank_id", "res_users"."next_rank_id" as "next_rank_id", "res_users"."odoobot_state" as "odoobot_state", "res_users"."odoobot_failed" as "odoobot_failed", "res_users"."sale_team_id" as "sale_team_id", "res_users"."chatter_position" as "chatter_position", "res_users"."oauth_provider_id" as "oauth_provider_id", "res_users"."oauth_uid" as "oauth_uid", "res_users"."oauth_access_token" as "oauth_access_token", "res_users"."microsoft_calendar_sync_token" as "microsoft_calendar_sync_token", "res_users"."target_sales_won" as "target_sales_won", "res_users"."target_sales_done" as "target_sales_done", "res_users"."website_id" as "website_id", "res_users"."read_only" as "read_only", "res_users"."target_sales_invoiced" as "target_sales_invoiced", "res_users"."helpdesk_target_closed" as "helpdesk_target_closed", "res_users"."helpdesk_target_rating" as "helpdesk_target_rating", "res_users"."helpdesk_target_success" as "helpdesk_target_success", "res_users"."create_uid" as "create_uid", "res_users"."create_date" as "create_date", "res_users"."write_uid" as "write_uid", "res_users"."write_date" as "write_date" FROM "res_users" WHERE "res_users".id IN ($1)
Covered by index on (id)
Rows: 30586
Row progression: 30586, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- login, website_id UNIQUE
- oauth_provider_id, oauth_uid UNIQUE
- partner_id
11 min < 0.1% 0 ms 9,774,842 odoo
SELECT $1 FROM res_groups_users_rel WHERE uid=$2 AND gid IN
                            (SELECT res_id FROM ir_model_data WHERE module=$3 AND name=$4 AND model=$5)
11 min < 0.1% 0 ms 8,560,735 odoo
SELECT res_company_users_rel.user_id, res_company_users_rel.cid FROM res_company_users_rel, "res_company"
                    WHERE $1=$2 AND res_company_users_rel.user_id IN ($3) AND res_company_users_rel.cid = res_company.id
                     ORDER BY "res_company"."sequence" ,"res_company"."name"    OFFSET $4
10 min < 0.1% 91 ms 6,909 odoo
SELECT "hr_payroll_bulletin_line".id FROM "hr_payroll_bulletin_line" LEFT JOIN "hr_payroll_rubrique" AS "hr_payroll_bulletin_line__name" ON ("hr_payroll_bulletin_line"."name" = "hr_payroll_bulletin_line__name"."id") WHERE ("hr_payroll_bulletin_line"."id_bulletin" in ($1)) ORDER BY  "hr_payroll_bulletin_line__name"."code"
10 min < 0.1% 0 ms 4,841,622 odoo
SELECT "account_bank_statement_line".id FROM "account_bank_statement_line" WHERE ("account_bank_statement_line"."move_id" in ($1)) ORDER BY  "account_bank_statement_line"."id"
Details
CREATE INDEX CONCURRENTLY ON account_bank_statement_line (move_id)
Rows: 1287
Row progression: 1287, 1

Row estimates
- move_id (=): 1
- id (sort): 1

Existing indexes
- id PRIMARY
- sequence
- statement_id
- unique_import_id UNIQUE
9 min < 0.1% 41 ms 13,530 odoo
SELECT "hr_payroll_bulletin".id FROM "hr_payroll_bulletin" WHERE ((("hr_payroll_bulletin"."employee_id" = $1) AND ("hr_payroll_bulletin"."wagecard" in (SELECT "wage_card_line".id FROM "wage_card_line" WHERE ("wage_card_line"."wage_card_id" in (SELECT "wage_card".id FROM "wage_card" WHERE ("wage_card"."wagecard_type" = $2)))))) AND ("hr_payroll_bulletin"."date_salary" < $3)) ORDER BY  "hr_payroll_bulletin"."id"   LIMIT $4
9 min < 0.1% 1 ms 437,810 odoo
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."ref"::text like $1) AND ("account_move"."state" = $2)) AND ("account_move"."company_id" = $3)) AND (("account_move"."company_id" IS NULL  OR ("account_move"."company_id" in ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22))) AND (((("account_move"."company_id" IS NULL  OR ("account_move"."company_id" in ($23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41))) OR (("account_move"."move_type" in ($42,$43,$44,$45,$46)) AND (("account_move"."invoice_user_id" = $47) OR "account_move"."invoice_user_id" IS NULL ))) OR (("account_move"."move_type" in ($48,$49,$50,$51,$52)) AND ((("account_move"."team_id" in (SELECT "crm_team".id FROM "crm_team" WHERE ("crm_team"."id" IN (SELECT "sale_team_id" FROM "res_users" WHERE "id" IN ($53) AND "sale_team_id" IS NOT NULL)))) OR ("account_move"."team_id" in (SELECT "crm_team".id FROM "crm_team" WHERE ("crm_team"."id" not in (SELECT "sale_team_id" FROM "res_users" WHERE "sale_team_id" IS NOT NULL))))) OR $54))) OR ("account_move"."move_type" in ($55,$56,$57)))) ORDER BY  "account_move"."date" DESC,"account_move"."name" DESC,"account_move"."id" DESC  LIMIT $58
7 min < 0.1% 59 ms 6,792 odoo
SELECT "hr_payroll_bulletin".id FROM "hr_payroll_bulletin" WHERE ("hr_payroll_bulletin"."payrun_id" in ($1)) AND $2 ORDER BY  "hr_payroll_bulletin"."id"
6 min < 0.1% 55 ms 6,911 odoo
SELECT "hr_payroll_bulletin".id FROM "hr_payroll_bulletin" WHERE ("hr_payroll_bulletin"."previous_payslip_id" in ($1)) ORDER BY  "hr_payroll_bulletin"."id"
Details
CREATE INDEX CONCURRENTLY ON hr_payroll_bulletin (previous_payslip_id)
Rows: 261972
Row progression: 261972, 17

Row estimates
- previous_payslip_id (=): 17
- id (sort): 1

Existing indexes
- id PRIMARY
6 min < 0.1% 0 ms 21,365,219 odoo
SELECT "ir_act_window"."id" as "id", "ir_act_window"."name" as "name", "ir_act_window"."type" as "type", "ir_act_window"."view_id" as "view_id", "ir_act_window"."domain" as "domain", "ir_act_window"."context" as "context", "ir_act_window"."res_id" as "res_id", "ir_act_window"."res_model" as "res_model", "ir_act_window"."target" as "target", "ir_act_window"."view_mode" as "view_mode", "ir_act_window"."usage" as "usage", "ir_act_window"."limit" as "limit", "ir_act_window"."search_view_id" as "search_view_id", "ir_act_window"."filter" as "filter", "ir_act_window"."binding_model_id" as "binding_model_id", "ir_act_window"."binding_type" as "binding_type", "ir_act_window"."binding_view_types" as "binding_view_types", "ir_act_window"."create_uid" as "create_uid", "ir_act_window"."create_date" as "create_date", "ir_act_window"."write_uid" as "write_uid", "ir_act_window"."write_date" as "write_date" FROM "ir_act_window" WHERE "ir_act_window".id IN ($1)
Covered by index on (id)
Rows: 835
Row progression: 835, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
6 min < 0.1% 0 ms 2,074,375 odoo
SELECT substr(p.res_id, $1)::integer, r.id
                FROM ir_property p
                LEFT JOIN account_account r ON substr(p.value_reference, $2)::integer=r.id
                WHERE p.fields_id=$3
                    AND (p.company_id=$4 OR p.company_id IS NULL)
                    AND (p.res_id IN ($5) OR p.res_id IS NULL)
                ORDER BY p.company_id NULLS FIRST
6 min < 0.1% 0 ms 6,306,646 odoo
SELECT MAX(CASE WHEN perm_write THEN $1 ELSE $2 END)
                              FROM ir_model_access a
                              JOIN ir_model m ON (m.id = a.model_id)
                              JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)
                             WHERE m.model = $3
                               AND gu.uid = $4
                               AND a.active IS TRUE
6 min < 0.1% 0 ms 6,320,783 odoo
SELECT MAX(CASE WHEN perm_create THEN $1 ELSE $2 END)
                              FROM ir_model_access a
                              JOIN ir_model m ON (m.id = a.model_id)
                              JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)
                             WHERE m.model = $3
                               AND gu.uid = $4
                               AND a.active IS TRUE
5 min < 0.1% 23 ms 13,530 odoo
SELECT "hr_employee_overtime".id FROM "hr_employee_overtime" WHERE ((((("hr_employee_overtime"."date" >= $1) AND ("hr_employee_overtime"."date" <= $2)) AND ("hr_employee_overtime"."type" = $3)) AND ("hr_employee_overtime"."state" = $4)) AND ("hr_employee_overtime"."name" = $5)) AND $6 ORDER BY  "hr_employee_overtime"."id"
5 min < 0.1% 1 ms 575,039 odoo
SELECT "mail_followers".id FROM "mail_followers" WHERE (("mail_followers"."res_model" = $1) AND ("mail_followers"."res_id" in ($2))) ORDER BY  "mail_followers"."id"
Covered by index on (res_id)
Rows: 2676954
Row progression: 2676954, 15

Row estimates
- res_id (=): 15
- res_model (=): 74360
- id (sort): 1

Existing indexes
- id PRIMARY
- channel_id
- partner_id
- res_id
- res_model
- res_model, res_id, channel_id UNIQUE
- res_model, res_id, partner_id UNIQUE
5 min < 0.1% 178 ms 1,642 odoo
SELECT min("account_analytic_line".id) AS id, count("account_analytic_line".id) AS "timesheet_invoice_id_count" , "account_analytic_line"."timesheet_invoice_id" as "timesheet_invoice_id" 
            FROM "account_analytic_line" LEFT JOIN "account_move" AS "account_analytic_line__timesheet_invoice_id" ON ("account_analytic_line"."timesheet_invoice_id" = "account_analytic_line__timesheet_invoice_id"."id")
            WHERE ("account_analytic_line"."timesheet_invoice_id" in ($1)) AND (("account_analytic_line"."company_id" IS NULL  OR ("account_analytic_line"."company_id" in ($2))) AND "account_analytic_line"."project_id" IS NULL )
            GROUP BY "account_analytic_line"."timesheet_invoice_id","account_analytic_line__timesheet_invoice_id"."date","account_analytic_line__timesheet_invoice_id"."name","account_analytic_line__timesheet_invoice_id"."id"
            ORDER BY  "account_analytic_line__timesheet_invoice_id"."date" DESC,"account_analytic_line__timesheet_invoice_id"."name" DESC,"account_analytic_line__timesheet_invoice_id"."id" DESC
5 min < 0.1% 4 ms 71,573 odoo
SELECT "res_partner"."id" as "id", "res_partner"."name" as "name", "res_partner"."display_name" as "display_name", "res_partner"."date" as "date", "res_partner"."title" as "title", "res_partner"."parent_id" as "parent_id", "res_partner"."ref" as "ref", "res_partner"."lang" as "lang", "res_partner"."tz" as "tz", "res_partner"."vat" as "vat", "res_partner"."website" as "website", "res_partner"."comment" as "comment", "res_partner"."active" as "active", "res_partner"."employee" as "employee", "res_partner"."function" as "function", "res_partner"."type" as "type", "res_partner"."street" as "street", "res_partner"."street2" as "street2", "res_partner"."zip" as "zip", "res_partner"."mobile" as "mobile", "res_partner"."is_company" as "is_company", "res_partner"."industry_id" as "industry_id", "res_partner"."company_id" as "company_id", "res_partner"."color" as "color", "res_partner"."partner_share" as "partner_share", "res_partner"."commercial_partner_id" as "commercial_partner_id", "res_partner"."commercial_company_name" as "commercial_company_name", "res_partner"."company_name" as "company_name", "res_partner"."message_main_attachment_id" as "message_main_attachment_id", "res_partner"."email_normalized" as "email_normalized", "res_partner"."message_bounce" as "message_bounce", "res_partner"."email" as "email", "res_partner"."phone" as "phone", "res_partner"."user_id" as "user_id", "res_partner"."calendar_last_notif_ack" as "calendar_last_notif_ack", "res_partner"."plan_to_change_car" as "plan_to_change_car", "res_partner"."phone_sanitized" as "phone_sanitized", "res_partner"."debit_limit" as "debit_limit", "res_partner"."last_time_entries_checked" as "last_time_entries_checked", "res_partner"."invoice_warn" as "invoice_warn", "res_partner"."invoice_warn_msg" as "invoice_warn_msg", "res_partner"."supplier_rank" as "supplier_rank", "res_partner"."customer_rank" as "customer_rank", "res_partner"."team_id" as "team_id", "res_partner"."picking_warn" as "picking_warn", "res_partner"."picking_warn_msg" as "picking_warn_msg", COALESCE("res_partner__website_meta_title"."value", "res_partner"."website_meta_title") as "website_meta_title", COALESCE("res_partner__website_meta_description"."value", "res_partner"."website_meta_description") as "website_meta_description", COALESCE("res_partner__website_meta_keywords"."value", "res_partner"."website_meta_keywords") as "website_meta_keywords", "res_partner"."website_meta_og_img" as "website_meta_og_img", COALESCE("res_partner__seo_name"."value", "res_partner"."seo_name") as "seo_name", "res_partner"."website_id" as "website_id", "res_partner"."is_published" as "is_published", "res_partner"."purchase_warn" as "purchase_warn", "res_partner"."purchase_warn_msg" as "purchase_warn_msg", COALESCE("res_partner__website_short_description"."value", "res_partner"."website_short_description") as "website_short_description", "res_partner"."sale_warn" as "sale_warn", "res_partner"."sale_warn_msg" as "sale_warn_msg", "res_partner"."available_in_pos" as "available_in_pos", "res_partner"."whatsapp_number" as "whatsapp_number", "res_partner"."whatsapp_device_id" as "whatsapp_device_id", "res_partner"."city_id" as "city_id", "res_partner"."delivery_area_id" as "delivery_area_id", "res_partner"."city" as "city", "res_partner"."warning_type" as "warning_type", "res_partner"."name_arabic" as "name_arabic", "res_partner"."credit_limit_days" as "credit_limit_days", "res_partner"."partner_latitude" as "partner_latitude", "res_partner"."partner_longitude" as "partner_longitude", "res_partner"."credit_limit" as "credit_limit", "res_partner"."over_credit" as "over_credit", "res_partner"."makani_number" as "makani_number", "res_partner"."stat" as "stat", "res_partner"."rcs" as "rcs", "res_partner"."date_birth" as "date_birth", "res_partner"."relation" as "relation", "res_partner"."nationality_country_id" as "nationality_country_id", "res_partner"."verified" as "verified", "res_partner"."country_id" as "country_id", "res_partner"."receivable_user_id" as "receivable_user_id", "res_partner"."state_id" as "state_id", "res_partner"."partner_group_id" as "partner_group_id", "res_partner"."commercial_group_id" as "commercial_group_id", "res_partner"."tax_id_not_applicable" as "tax_id_not_applicable", "res_partner"."create_uid" as "create_uid", "res_partner"."create_date" as "create_date", "res_partner"."write_uid" as "write_uid", "res_partner"."write_date" as "write_date" FROM "res_partner" LEFT JOIN "ir_translation" AS "res_partner__website_meta_title" ON ("res_partner"."id" = "res_partner__website_meta_title"."res_id" AND "res_partner__website_meta_title"."type" = $1 AND "res_partner__website_meta_title"."name" = $2 AND "res_partner__website_meta_title"."lang" = $3 AND "res_partner__website_meta_title"."value" != $4) LEFT JOIN "ir_translation" AS "res_partner__website_meta_description" ON ("res_partner"."id" = "res_partner__website_meta_description"."res_id" AND "res_partner__website_meta_description"."type" = $5 AND "res_partner__website_meta_description"."name" = $6 AND "res_partner__website_meta_description"."lang" = $7 AND "res_partner__website_meta_description"."value" != $8) LEFT JOIN "ir_translation" AS "res_partner__website_meta_keywords" ON ("res_partner"."id" = "res_partner__website_meta_keywords"."res_id" AND "res_partner__website_meta_keywords"."type" = $9 AND "res_partner__website_meta_keywords"."name" = $10 AND "res_partner__website_meta_keywords"."lang" = $11 AND "res_partner__website_meta_keywords"."value" != $12) LEFT JOIN "ir_translation" AS "res_partner__seo_name" ON ("res_partner"."id" = "res_partner__seo_name"."res_id" AND "res_partner__seo_name"."type" = $13 AND "res_partner__seo_name"."name" = $14 AND "res_partner__seo_name"."lang" = $15 AND "res_partner__seo_name"."value" != $16) LEFT JOIN "ir_translation" AS "res_partner__website_short_description" ON ("res_partner"."id" = "res_partner__website_short_description"."res_id" AND "res_partner__website_short_description"."type" = $17 AND "res_partner__website_short_description"."name" = $18 AND "res_partner__website_short_description"."lang" = $19 AND "res_partner__website_short_description"."value" != $20) WHERE "res_partner".id IN ($21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430)
5 min < 0.1% 4 ms 68,153 odoo
SELECT pg_catalog.pg_get_viewdef($1::pg_catalog.oid) AS viewdef
5 min < 0.1% 0 ms 583,207 odoo
SELECT "resource_resource"."id" as "id", "resource_resource"."name" as "name", "resource_resource"."active" as "active", "resource_resource"."company_id" as "company_id", "resource_resource"."resource_type" as "resource_type", "resource_resource"."time_efficiency" as "time_efficiency", "resource_resource"."calendar_id" as "calendar_id", "resource_resource"."tz" as "tz", "resource_resource"."user_id" as "user_id", "resource_resource"."create_uid" as "create_uid", "resource_resource"."create_date" as "create_date", "resource_resource"."write_uid" as "write_uid", "resource_resource"."write_date" as "write_date" FROM "resource_resource" WHERE "resource_resource".id IN ($1)
Covered by index on (id)
Rows: 32035
Row progression: 32035, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
5 min < 0.1% 75 ms 3,638 odoo
SELECT res_partner.id
                         FROM "res_partner"
                       WHERE ("res_partner"."active" = $1) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $2 ) OR ("res_partner"."company_id" in ($3))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $4) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR (("res_partner"."type" = $5) AND ("res_partner"."create_uid" = $6)))) AND  (res_partner.email ilike $7
                           OR res_partner.display_name ilike $8
                           OR res_partner.ref ilike $9
                           OR res_partner.vat ilike $10)
                           -- don't panic, trust postgres bitmap
                     ORDER BY  res_partner.display_name ilike $11 desc,
                              res_partner.display_name
5 min < 0.1% 13 ms 20,863 odoo
INSERT INTO "mail_message" ("id", "create_uid", "create_date", "write_uid", "write_date", "add_sign", "author_id", "body", "date", "email_from", "email_layout_xmlid", "mail_activity_type_id", "mail_server_id", "message_id", "message_type", "model", "no_auto_thread", "parent_id", "record_name", "reply_to", "res_id", "subject", "subtype_id") VALUES (nextval($1), $2, (now() at time zone $3), $4, (now() at time zone $5), $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23) RETURNING id
4 min < 0.1% 14 ms 18,570 odoo
INSERT INTO "mail_message" ("id", "create_uid", "create_date", "write_uid", "write_date", "add_sign", "author_id", "body", "date", "email_from", "message_id", "message_type", "model", "parent_id", "record_name", "reply_to", "res_id", "subject", "subtype_id") VALUES (nextval($1), $2, (now() at time zone $3), $4, (now() at time zone $5), $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) RETURNING id
4 min < 0.1% 0 ms 11,745,923 odoo
SELECT "res_users"."id" as "id", "res_users"."partner_id" as "partner_id", "res_users"."login" as "login", "res_users"."signature" as "signature", "res_users"."active" as "active", "res_users"."action_id" as "action_id", "res_users"."share" as "share", "res_users"."company_id" as "company_id", "res_users"."notification_type" as "notification_type", "res_users"."microsoft_calendar_rtoken" as "microsoft_calendar_rtoken", "res_users"."microsoft_calendar_token" as "microsoft_calendar_token", "res_users"."microsoft_calendar_token_validity" as "microsoft_calendar_token_validity", "res_users"."karma" as "karma", "res_users"."rank_id" as "rank_id", "res_users"."next_rank_id" as "next_rank_id", "res_users"."odoobot_state" as "odoobot_state", "res_users"."odoobot_failed" as "odoobot_failed", "res_users"."sale_team_id" as "sale_team_id", "res_users"."chatter_position" as "chatter_position", "res_users"."oauth_provider_id" as "oauth_provider_id", "res_users"."oauth_uid" as "oauth_uid", "res_users"."oauth_access_token" as "oauth_access_token", "res_users"."microsoft_calendar_sync_token" as "microsoft_calendar_sync_token", "res_users"."target_sales_won" as "target_sales_won", "res_users"."target_sales_done" as "target_sales_done", "res_users"."website_id" as "website_id", "res_users"."read_only" as "read_only", "res_users"."target_sales_invoiced" as "target_sales_invoiced", "res_users"."helpdesk_target_closed" as "helpdesk_target_closed", "res_users"."helpdesk_target_rating" as "helpdesk_target_rating", "res_users"."helpdesk_target_success" as "helpdesk_target_success", "res_users"."create_uid" as "create_uid", "res_users"."create_date" as "create_date", "res_users"."write_uid" as "write_uid", "res_users"."write_date" as "write_date" FROM "res_users" WHERE "res_users".id IN ($1)
Covered by index on (id)
Rows: 30586
Row progression: 30586, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- login, website_id UNIQUE
- oauth_provider_id, oauth_uid UNIQUE
- partner_id
4 min < 0.1% 0 ms 1,022,719 odoo
SELECT name, id FROM ir_model_fields WHERE model=$1
Covered by index on (model, name)
Rows: 17511
Row progression: 17511, 21

Row estimates
- model (=): 21

Existing indexes
- id PRIMARY
- complete_name
- model, name UNIQUE
- model_id
- name
- state
- website_form_blacklisted
4 min < 0.1% 0 ms 812,620 odoo
SELECT id, model, res_id FROM ir_model_data WHERE module=$1 AND name=$2
Details
CREATE INDEX CONCURRENTLY ON ir_model_data (name)
Rows: 4246811
Row progression: 4246811, 1

Row estimates
- name (=): 1
- module (=): 42897

Existing indexes
- id PRIMARY
- model, res_id
- module, name UNIQUE
4 min < 0.1% 3 ms 72,347 odoo
INSERT INTO "mail_followers" ("id", "channel_id", "partner_id", "res_id", "res_model") VALUES (nextval($1), $2, $3, $4, $5) RETURNING id
4 min < 0.1% 0 ms 4,614,981 odoo
UPDATE "bus_presence" SET "last_poll"=$1 WHERE id IN ($2)
4 min < 0.1% 0 ms 5,254,306 odoo
SELECT rule_group_rel.rule_group_id, rule_group_rel.group_id FROM rule_group_rel, "res_groups" LEFT JOIN "ir_translation" AS "res_groups__name" ON ("res_groups"."id" = "res_groups__name"."res_id" AND "res_groups__name"."type" = $1 AND "res_groups__name"."name" = $2 AND "res_groups__name"."lang" = $3 AND "res_groups__name"."value" != $4)
                    WHERE $5=$6 AND rule_group_rel.rule_group_id IN ($7) AND rule_group_rel.group_id = res_groups.id
                     ORDER BY COALESCE("res_groups__name"."value", "res_groups"."name")    OFFSET $8
4 min < 0.1% 6 ms 38,372 odoo
SELECT "hr_contract".id FROM "hr_contract" WHERE ((("hr_contract"."active" = $1) AND ("hr_contract"."employee_id" = $2)) AND (((("hr_contract"."date_end" <= $3) AND ("hr_contract"."date_end" >= $4)) OR (("hr_contract"."date_start" <= $5) AND ("hr_contract"."date_start" >= $6))) OR (("hr_contract"."date_start" <= $7) AND ("hr_contract"."date_end" IS NULL  OR ("hr_contract"."date_end" >= $8))))) AND ("hr_contract"."company_id" IS NULL  OR ("hr_contract"."company_id" in ($9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27))) ORDER BY  "hr_contract"."date_start" ASC
3 min < 0.1% 0 ms 2,616,813 odoo
SELECT rule_group_rel.rule_group_id, rule_group_rel.group_id FROM rule_group_rel, "res_groups" LEFT JOIN "ir_translation" AS "res_groups__name" ON ("res_groups"."id" = "res_groups__name"."res_id" AND "res_groups__name"."type" = $1 AND "res_groups__name"."name" = $2 AND "res_groups__name"."lang" = $3 AND "res_groups__name"."value" != $4)
                    WHERE $5=$6 AND rule_group_rel.rule_group_id IN ($7, $8, $9) AND rule_group_rel.group_id = res_groups.id
                     ORDER BY COALESCE("res_groups__name"."value", "res_groups"."name")    OFFSET $10
3 min < 0.1% 52 ms 3,839 odoo
SELECT mail_channel_partner.channel_id, mail_channel_partner.partner_id FROM mail_channel_partner, "res_partner"
                    WHERE $1=$2 AND mail_channel_partner.channel_id IN ($3) AND mail_channel_partner.partner_id = res_partner.id
                     ORDER BY "res_partner"."display_name"    OFFSET $4
3 min < 0.1% 0 ms 9,656,328 odoo
SELECT MAX(CASE WHEN perm_read THEN $1 ELSE $2 END)
                                  FROM ir_model_access a
                                  JOIN ir_model m ON (m.id = a.model_id)
                                 WHERE a.group_id IS NULL
                                   AND m.model = $3
                                   AND a.active IS TRUE
3 min < 0.1% 0 ms 4,617,543 odoo
SELECT "ir_ui_view"."id" as "id", "ir_ui_view"."arch_db" as "arch_db" FROM "ir_ui_view" WHERE "ir_ui_view".id IN ($1)
Covered by index on (id)
Rows: 3442
Row progression: 3442, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- inherit_id
- model, inherit_id
3 min < 0.1% 1 ms 253,624 odoo
SELECT * FROM ir_cron
                              WHERE numbercall != $1
                                  AND active AND nextcall <= (now() at time zone $2)
                              ORDER BY priority
3 min < 0.1% 1 ms 143,245 odoo
SELECT mail_followers_mail_message_subtype_rel.mail_followers_id, mail_followers_mail_message_subtype_rel.mail_message_subtype_id FROM mail_followers_mail_message_subtype_rel, "mail_message_subtype"
                    WHERE $1=$2 AND mail_followers_mail_message_subtype_rel.mail_followers_id IN ($3) AND mail_followers_mail_message_subtype_rel.mail_message_subtype_id = mail_message_subtype.id
                     ORDER BY "mail_message_subtype"."sequence" ,"mail_message_subtype"."id"    OFFSET $4
3 min < 0.1% 284 ms 619 odoo
SELECT res_groups_users_rel.gid, res_groups_users_rel.uid FROM res_groups_users_rel, "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id")
                    WHERE (("res_users"."share" IS NULL or "res_users"."share" = $1 ) OR 
                        EXISTS (
                            SELECT $2 FROM "res_company_users_rel" AS "res_users__company_ids"
                            WHERE "res_users__company_ids"."user_id" = "res_users".id
                            AND "res_users__company_ids"."cid" IN ($3)
                        )
                    ) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = $4 ) OR ("res_users__partner_id"."company_id" in ($5))) OR "res_users__partner_id"."company_id" IS NULL ) AND (((("res_users__partner_id"."type" != $6) OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL ) OR (("res_users__partner_id"."type" = $7) AND ("res_users__partner_id"."create_uid" = $8)))) AND res_groups_users_rel.gid IN ($9) AND res_groups_users_rel.uid = res_users.id
                     ORDER BY "res_users__partner_id"."name" ,"res_users"."login"    OFFSET $10
3 min < 0.1% 0 ms 1,518,460 odoo
SELECT "ir_model_data".id FROM "ir_model_data" WHERE (("ir_model_data"."model" = $1) AND ("ir_model_data"."res_id" in ($2))) ORDER BY  "ir_model_data"."id"
Details
CREATE INDEX CONCURRENTLY ON ir_model_data (res_id)
Rows: 4246811
Row progression: 4246811, 3

Row estimates
- res_id (=): 3
- model (=): 74505
- id (sort): 1

Existing indexes
- id PRIMARY
- model, res_id
- module, name UNIQUE
3 min < 0.1% 1 ms 139,573 odoo
SELECT "mail_message".id FROM "mail_message" WHERE (((("mail_message"."message_type" != $1) OR "mail_message"."message_type" IS NULL) AND ("mail_message"."model" = $2)) AND ("mail_message"."res_id" in ($3))) ORDER BY  "mail_message"."id" DESC
3 min < 0.1% 0 ms 2,331,756 odoo
SELECT "res_partner"."id" as "id", "res_partner"."name" as "name", "res_partner"."display_name" as "display_name", "res_partner"."date" as "date", "res_partner"."title" as "title", "res_partner"."parent_id" as "parent_id", "res_partner"."ref" as "ref", "res_partner"."lang" as "lang", "res_partner"."tz" as "tz", "res_partner"."vat" as "vat", "res_partner"."website" as "website", "res_partner"."comment" as "comment", "res_partner"."active" as "active", "res_partner"."employee" as "employee", "res_partner"."function" as "function", "res_partner"."type" as "type", "res_partner"."street" as "street", "res_partner"."street2" as "street2", "res_partner"."zip" as "zip", "res_partner"."mobile" as "mobile", "res_partner"."is_company" as "is_company", "res_partner"."industry_id" as "industry_id", "res_partner"."company_id" as "company_id", "res_partner"."color" as "color", "res_partner"."partner_share" as "partner_share", "res_partner"."commercial_partner_id" as "commercial_partner_id", "res_partner"."commercial_company_name" as "commercial_company_name", "res_partner"."company_name" as "company_name", "res_partner"."message_main_attachment_id" as "message_main_attachment_id", "res_partner"."email_normalized" as "email_normalized", "res_partner"."message_bounce" as "message_bounce", "res_partner"."email" as "email", "res_partner"."phone" as "phone", "res_partner"."user_id" as "user_id", "res_partner"."calendar_last_notif_ack" as "calendar_last_notif_ack", "res_partner"."plan_to_change_car" as "plan_to_change_car", "res_partner"."phone_sanitized" as "phone_sanitized", "res_partner"."debit_limit" as "debit_limit", "res_partner"."last_time_entries_checked" as "last_time_entries_checked", "res_partner"."invoice_warn" as "invoice_warn", "res_partner"."invoice_warn_msg" as "invoice_warn_msg", "res_partner"."supplier_rank" as "supplier_rank", "res_partner"."customer_rank" as "customer_rank", "res_partner"."team_id" as "team_id", "res_partner"."picking_warn" as "picking_warn", "res_partner"."picking_warn_msg" as "picking_warn_msg", COALESCE("res_partner__website_meta_title"."value", "res_partner"."website_meta_title") as "website_meta_title", COALESCE("res_partner__website_meta_description"."value", "res_partner"."website_meta_description") as "website_meta_description", COALESCE("res_partner__website_meta_keywords"."value", "res_partner"."website_meta_keywords") as "website_meta_keywords", "res_partner"."website_meta_og_img" as "website_meta_og_img", COALESCE("res_partner__seo_name"."value", "res_partner"."seo_name") as "seo_name", "res_partner"."website_id" as "website_id", "res_partner"."is_published" as "is_published", "res_partner"."purchase_warn" as "purchase_warn", "res_partner"."purchase_warn_msg" as "purchase_warn_msg", COALESCE("res_partner__website_short_description"."value", "res_partner"."website_short_description") as "website_short_description", "res_partner"."sale_warn" as "sale_warn", "res_partner"."sale_warn_msg" as "sale_warn_msg", "res_partner"."available_in_pos" as "available_in_pos", "res_partner"."whatsapp_number" as "whatsapp_number", "res_partner"."whatsapp_device_id" as "whatsapp_device_id", "res_partner"."city_id" as "city_id", "res_partner"."delivery_area_id" as "delivery_area_id", "res_partner"."city" as "city", "res_partner"."warning_type" as "warning_type", "res_partner"."name_arabic" as "name_arabic", "res_partner"."credit_limit_days" as "credit_limit_days", "res_partner"."partner_latitude" as "partner_latitude", "res_partner"."partner_longitude" as "partner_longitude", "res_partner"."credit_limit" as "credit_limit", "res_partner"."over_credit" as "over_credit", "res_partner"."makani_number" as "makani_number", "res_partner"."stat" as "stat", "res_partner"."rcs" as "rcs", "res_partner"."date_birth" as "date_birth", "res_partner"."relation" as "relation", "res_partner"."nationality_country_id" as "nationality_country_id", "res_partner"."verified" as "verified", "res_partner"."country_id" as "country_id", "res_partner"."receivable_user_id" as "receivable_user_id", "res_partner"."state_id" as "state_id", "res_partner"."partner_group_id" as "partner_group_id", "res_partner"."commercial_group_id" as "commercial_group_id", "res_partner"."tax_id_not_applicable" as "tax_id_not_applicable", "res_partner"."create_uid" as "create_uid", "res_partner"."create_date" as "create_date", "res_partner"."write_uid" as "write_uid", "res_partner"."write_date" as "write_date" FROM "res_partner" LEFT JOIN "ir_translation" AS "res_partner__website_meta_title" ON ("res_partner"."id" = "res_partner__website_meta_title"."res_id" AND "res_partner__website_meta_title"."type" = $1 AND "res_partner__website_meta_title"."name" = $2 AND "res_partner__website_meta_title"."lang" = $3 AND "res_partner__website_meta_title"."value" != $4) LEFT JOIN "ir_translation" AS "res_partner__website_meta_description" ON ("res_partner"."id" = "res_partner__website_meta_description"."res_id" AND "res_partner__website_meta_description"."type" = $5 AND "res_partner__website_meta_description"."name" = $6 AND "res_partner__website_meta_description"."lang" = $7 AND "res_partner__website_meta_description"."value" != $8) LEFT JOIN "ir_translation" AS "res_partner__website_meta_keywords" ON ("res_partner"."id" = "res_partner__website_meta_keywords"."res_id" AND "res_partner__website_meta_keywords"."type" = $9 AND "res_partner__website_meta_keywords"."name" = $10 AND "res_partner__website_meta_keywords"."lang" = $11 AND "res_partner__website_meta_keywords"."value" != $12) LEFT JOIN "ir_translation" AS "res_partner__seo_name" ON ("res_partner"."id" = "res_partner__seo_name"."res_id" AND "res_partner__seo_name"."type" = $13 AND "res_partner__seo_name"."name" = $14 AND "res_partner__seo_name"."lang" = $15 AND "res_partner__seo_name"."value" != $16) LEFT JOIN "ir_translation" AS "res_partner__website_short_description" ON ("res_partner"."id" = "res_partner__website_short_description"."res_id" AND "res_partner__website_short_description"."type" = $17 AND "res_partner__website_short_description"."name" = $18 AND "res_partner__website_short_description"."lang" = $19 AND "res_partner__website_short_description"."value" != $20) WHERE (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $21 ) OR ("res_partner"."company_id" in ($22))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $23) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR (("res_partner"."type" = $24) AND ("res_partner"."create_uid" = $25)))) AND "res_partner".id IN ($26)
3 min < 0.1% 23 ms 6,765 odoo
SELECT "hr_employee_overtime".id FROM "hr_employee_overtime" WHERE ((((("hr_employee_overtime"."date" >= $1) AND ("hr_employee_overtime"."date" <= $2)) AND ("hr_employee_overtime"."state" = $3)) AND ("hr_employee_overtime"."type" = $4)) AND ("hr_employee_overtime"."name" = $5)) AND $6 ORDER BY  "hr_employee_overtime"."id"
3 min < 0.1% 2 ms 96,765 odoo
SELECT "hr_expense_sheet".id FROM "hr_expense_sheet" WHERE ("hr_expense_sheet"."account_move_id" in ($1)) ORDER BY  "hr_expense_sheet"."id"
Details
CREATE INDEX CONCURRENTLY ON hr_expense_sheet (account_move_id)
Rows: 7931
Row progression: 7931, 1

Row estimates
- account_move_id (=): 1
- id (sort): 1

Existing indexes
- id PRIMARY
- message_main_attachment_id
- state
2 min < 0.1% 0 ms 1,805,947 odoo
SELECT "ir_ui_view".id FROM "ir_ui_view" WHERE (((("ir_ui_view"."active" = $1) AND ("ir_ui_view"."model" = $2)) AND ("ir_ui_view"."type" = $3)) AND ("ir_ui_view"."mode" = $4)) ORDER BY  "ir_ui_view"."priority" ,"ir_ui_view"."name" ,"ir_ui_view"."id"   LIMIT $5
Covered by index on (model, inherit_id)
Rows: 3442
Row progression: 3442, 4

Row estimates
- model (=): 4
- type (=): 313
- active (=): 1721
- mode (=): 1721
- priority (sort): 82
- name (sort): 1
- id (sort): 1

Existing indexes
- id PRIMARY
- inherit_id
- model, inherit_id
2 min < 0.1% 62 ms 2,096 odoo
SELECT "product_product".id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = $1 AND "product_product__product_tmpl_id__name"."name" = $2 AND "product_product__product_tmpl_id__name"."lang" = $3 AND "product_product__product_tmpl_id__name"."value" != $4) WHERE (((("product_product"."active" = $5) AND ("product_product__product_tmpl_id"."purchase_ok" = $6)) AND COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name") ilike $7) AND ($8 OR "product_product"."id" IS NULL)) AND (("product_product__product_tmpl_id"."company_id" in ($9)) OR "product_product__product_tmpl_id"."company_id" IS NULL ) ORDER BY  "product_product"."default_code" ,COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name") ,"product_product"."id"   LIMIT $10
2 min < 0.1% 0 ms 6,106,570 odoo
SELECT "bus_presence".id FROM "bus_presence" WHERE ("bus_presence"."user_id" = $1) ORDER BY  "bus_presence"."id"   LIMIT $2
2 min < 0.1% 0 ms 1,451,669 odoo
SELECT crm_team_res_users_rel.res_users_id, crm_team_res_users_rel.crm_team_id FROM crm_team_res_users_rel, "crm_team"
                    WHERE $1=$2 AND crm_team_res_users_rel.res_users_id IN ($3) AND crm_team_res_users_rel.crm_team_id = crm_team.id
                     ORDER BY "crm_team"."sequence"    OFFSET $4
2 min < 0.1% 11 ms 11,537 odoo
SELECT msg.res_id FROM mail_message msg
                                 RIGHT JOIN mail_message_res_partner_needaction_rel rel
                                 ON rel.mail_message_id = msg.id AND rel.res_partner_id = $1 AND (rel.is_read = $2 OR rel.is_read IS NULL)
                                 WHERE msg.model = $3 AND msg.res_id in ($4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83) AND msg.message_type != $84
2 min < 0.1% 6 ms 20,196 odoo
SELECT "hr_payroll_bulletin"."id" as "id", "hr_payroll_bulletin"."name" as "name", "hr_payroll_bulletin"."date_salary" as "date_salary", "hr_payroll_bulletin"."employee_id" as "employee_id", "hr_payroll_bulletin"."employee_contract_id" as "employee_contract_id", "hr_payroll_bulletin"."payrun_id" as "payrun_id", "hr_payroll_bulletin"."salaire_base" as "salaire_base", "hr_payroll_bulletin"."normal_hours" as "normal_hours", "hr_payroll_bulletin"."overtime_hours" as "overtime_hours", "hr_payroll_bulletin"."absences" as "absences", "hr_payroll_bulletin"."cash" as "cash", "hr_payroll_bulletin"."normal" as "normal", "hr_payroll_bulletin"."hs_extra" as "hs_extra", "hr_payroll_bulletin"."hs_sunday" as "hs_sunday", "hr_payroll_bulletin"."hs_ferie" as "hs_ferie", "hr_payroll_bulletin"."nuit" as "nuit", "hr_payroll_bulletin"."nuit_ferie" as "nuit_ferie", "hr_payroll_bulletin"."nuit_sunday" as "nuit_sunday", "hr_payroll_bulletin"."work_company_id" as "work_company_id", "hr_payroll_bulletin"."company_id" as "company_id", "hr_payroll_bulletin"."hour_base" as "hour_base", "hr_payroll_bulletin"."comment" as "comment", "hr_payroll_bulletin"."salaire" as "salaire", "hr_payroll_bulletin"."salaire_brute" as "salaire_brute", "hr_payroll_bulletin"."salaire_brute_imposable" as "salaire_brute_imposable", "hr_payroll_bulletin"."salaire_net" as "salaire_net", "hr_payroll_bulletin"."salaire_net_a_payer" as "salaire_net_a_payer", "hr_payroll_bulletin"."salaire_net_imposable" as "salaire_net_imposable", "hr_payroll_bulletin"."cotisations_employee" as "cotisations_employee", "hr_payroll_bulletin"."cotisations_employer" as "cotisations_employer", "hr_payroll_bulletin"."igr" as "igr", "hr_payroll_bulletin"."ir_brut" as "ir_brut", "hr_payroll_bulletin"."prime" as "prime", "hr_payroll_bulletin"."indemnite" as "indemnite", "hr_payroll_bulletin"."avantage" as "avantage", "hr_payroll_bulletin"."exoneration" as "exoneration", "hr_payroll_bulletin"."deduction" as "deduction", "hr_payroll_bulletin"."permanent_increment" as "permanent_increment", "hr_payroll_bulletin"."non_permanent_increment" as "non_permanent_increment", "hr_payroll_bulletin"."unpaid_leaves" as "unpaid_leaves", "hr_payroll_bulletin"."paid_leaves" as "paid_leaves", "hr_payroll_bulletin"."working_days" as "working_days", "hr_payroll_bulletin"."net_working_days" as "net_working_days", "hr_payroll_bulletin"."prime_anciennete" as "prime_anciennete", "hr_payroll_bulletin"."frais_pro" as "frais_pro", "hr_payroll_bulletin"."personnes" as "personnes", "hr_payroll_bulletin"."absence" as "absence", "hr_payroll_bulletin"."arrondi" as "arrondi", "hr_payroll_bulletin"."logement" as "logement", "hr_payroll_bulletin"."previous_payslip_id" as "previous_payslip_id", "hr_payroll_bulletin"."previous_arrondi" as "previous_arrondi", "hr_payroll_bulletin"."wps_report_id" as "wps_report_id", "hr_payroll_bulletin"."flight_paid_date" as "flight_paid_date", "hr_payroll_bulletin"."provision_move_id" as "provision_move_id", "hr_payroll_bulletin"."wagecard" as "wagecard", "hr_payroll_bulletin"."division_id" as "division_id", "hr_payroll_bulletin"."create_uid" as "create_uid", "hr_payroll_bulletin"."create_date" as "create_date", "hr_payroll_bulletin"."write_uid" as "write_uid", "hr_payroll_bulletin"."write_date" as "write_date" FROM "hr_payroll_bulletin" WHERE $1 AND "hr_payroll_bulletin".id IN ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001)
2 min < 0.1% 1 ms 80,159 odoo
SELECT "mail_channel".id FROM "mail_channel" WHERE (("mail_channel"."active" = $1) AND 
                        EXISTS (
                            SELECT $2 FROM "mail_channel_partner" AS "mail_channel__channel_partner_ids"
                            WHERE "mail_channel__channel_partner_ids"."channel_id" = "mail_channel".id
                            AND "mail_channel__channel_partner_ids"."partner_id" IN ($3)
                        )
                    ) AND ((("mail_channel"."public" = $4) OR (("mail_channel"."public" = $5) AND 
                        EXISTS (
                            SELECT $6 FROM "mail_channel_partner" AS "mail_channel__channel_partner_ids"
                            WHERE "mail_channel__channel_partner_ids"."channel_id" = "mail_channel".id
                            AND "mail_channel__channel_partner_ids"."partner_id" IN ($7)
                        )
                    )) OR (("mail_channel"."public" = $8) AND ("mail_channel"."group_public_id" in ($9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35)))) ORDER BY  "mail_channel"."id"
2 min < 0.1% 0 ms 490,398 odoo
SELECT "hr_employee".id FROM "hr_employee" WHERE (("hr_employee"."company_id" in ($1,$2)) AND ("hr_employee"."user_id" in ($3))) ORDER BY  "hr_employee"."code"
Covered by index on (user_id, company_id)
Rows: 32135
Row progression: 32135, 1

Row estimates
- user_id (=): 1
- company_id (=): 10712
- code (sort): 1

Existing indexes
- id PRIMARY
- barcode UNIQUE
- company_id
- message_main_attachment_id
- resource_calendar_id
- resource_id
- user_id, company_id UNIQUE
2 min < 0.1% 0 ms 2,949,693 odoo
SELECT "res_currency"."id" as "id", "res_currency"."name" as "name", "res_currency"."symbol" as "symbol", "res_currency"."rounding" as "rounding", "res_currency"."decimal_places" as "decimal_places", "res_currency"."active" as "active", "res_currency"."position" as "position", "res_currency"."currency_unit_label" as "currency_unit_label", "res_currency"."currency_subunit_label" as "currency_subunit_label", "res_currency"."excel_format" as "excel_format", "res_currency"."create_uid" as "create_uid", "res_currency"."create_date" as "create_date", "res_currency"."write_uid" as "write_uid", "res_currency"."write_date" as "write_date" FROM "res_currency" WHERE "res_currency".id IN ($1)
2 min < 0.1% 0 ms 2,338,813 odoo
WITH RECURSIVE ir_ui_view_inherits AS (
                SELECT id, inherit_id, priority
                FROM ir_ui_view
                WHERE inherit_id = $1 AND (($2 OR "ir_ui_view"."website_id" IS NULL) AND ((("ir_ui_view"."model" = $3) AND ("ir_ui_view"."mode" = $4)) AND ("ir_ui_view"."active" = $5)))
            UNION
                SELECT iuv.id, iuv.inherit_id, iuv.priority
                FROM ir_ui_view iuv
                INNER JOIN ir_ui_view_inherits iuvi ON iuvi.id = iuv.inherit_id
                WHERE (($6 OR "iuv"."website_id" IS NULL) AND ((("iuv"."model" = $7) AND ("iuv"."mode" = $8)) AND ("iuv"."active" = $9)))
            )
            SELECT id
            FROM ir_ui_view_inherits
            ORDER BY priority, id
2 min < 0.1% 0 ms 6,106,547 odoo
SELECT "bus_presence"."id" as "id", "bus_presence"."user_id" as "user_id", "bus_presence"."last_poll" as "last_poll", "bus_presence"."last_presence" as "last_presence", "bus_presence"."status" as "status" FROM "bus_presence" WHERE "bus_presence".id IN ($1)
2 min < 0.1% 0 ms 4,409,841 odoo
SELECT "res_lang"."id" as "id", "res_lang"."name" as "name", "res_lang"."code" as "code", "res_lang"."iso_code" as "iso_code", "res_lang"."url_code" as "url_code", "res_lang"."active" as "active", "res_lang"."direction" as "direction", "res_lang"."date_format" as "date_format", "res_lang"."time_format" as "time_format", "res_lang"."week_start" as "week_start", "res_lang"."grouping" as "grouping", "res_lang"."decimal_point" as "decimal_point", "res_lang"."thousands_sep" as "thousands_sep", "res_lang"."create_uid" as "create_uid", "res_lang"."create_date" as "create_date", "res_lang"."write_uid" as "write_uid", "res_lang"."write_date" as "write_date" FROM "res_lang" WHERE "res_lang".id IN ($1)
2 min < 0.1% 16 ms 6,393 odoo
SELECT "hr_attendance".id FROM "hr_attendance" WHERE (((("hr_attendance"."employee_id" = $1) AND ("hr_attendance"."analytic_account_id" in ($2,$3,$4,$5,$6,$7))) AND ("hr_attendance"."check_in" >= $8)) AND ("hr_attendance"."check_in" <= $9)) AND (("hr_attendance"."employee_id" in (SELECT "hr_employee".id FROM "hr_employee" WHERE "hr_employee"."company_id" IS NULL )) OR ("hr_attendance"."employee_id" in (SELECT "hr_employee".id FROM "hr_employee" WHERE ("hr_employee"."company_id" in ($10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28))))) ORDER BY  "hr_attendance"."name" DESC
2 min < 0.1% 1 ms 78,542 odoo
SELECT "mail_channel".id FROM "mail_channel" WHERE (("mail_channel"."active" = $1) AND 
                        EXISTS (
                            SELECT $2 FROM "mail_channel_partner" AS "mail_channel__channel_partner_ids"
                            WHERE "mail_channel__channel_partner_ids"."channel_id" = "mail_channel".id
                            AND "mail_channel__channel_partner_ids"."partner_id" IN ($3)
                        )
                    ) AND ((("mail_channel"."public" = $4) OR (("mail_channel"."public" = $5) AND 
                        EXISTS (
                            SELECT $6 FROM "mail_channel_partner" AS "mail_channel__channel_partner_ids"
                            WHERE "mail_channel__channel_partner_ids"."channel_id" = "mail_channel".id
                            AND "mail_channel__channel_partner_ids"."partner_id" IN ($7)
                        )
                    )) OR (("mail_channel"."public" = $8) AND ("mail_channel"."group_public_id" in ($9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32)))) ORDER BY  "mail_channel"."id"
2 min < 0.1% 0 ms 1,461,734 odoo
SELECT rule_group_rel.rule_group_id, rule_group_rel.group_id FROM rule_group_rel, "res_groups" LEFT JOIN "ir_translation" AS "res_groups__name" ON ("res_groups"."id" = "res_groups__name"."res_id" AND "res_groups__name"."type" = $1 AND "res_groups__name"."name" = $2 AND "res_groups__name"."lang" = $3 AND "res_groups__name"."value" != $4)
                    WHERE $5=$6 AND rule_group_rel.rule_group_id IN ($7, $8) AND rule_group_rel.group_id = res_groups.id
                     ORDER BY COALESCE("res_groups__name"."value", "res_groups"."name")    OFFSET $9
2 min < 0.1% 1 ms 71,834 odoo
SELECT
                U.partner_id as id,
                CASE WHEN max(B.last_poll) IS NULL THEN $1
                    WHEN age(now() AT TIME ZONE $2, max(B.last_poll)) > interval $3 THEN $4
                    WHEN age(now() AT TIME ZONE $5, max(B.last_presence)) > interval $6 THEN $7
                    ELSE $8
                END as status
            FROM bus_presence B
            RIGHT JOIN res_users U ON B.user_id = U.id
            WHERE U.partner_id IN ($9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418) AND U.active = $419
         GROUP BY U.partner_id
2 min < 0.1% 0 ms 226,311 odoo
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL  AND ("ir_attachment"."res_id" = $1)) AND ("ir_attachment"."res_model" = $2)) ORDER BY  "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (res_id)
Rows: 732741
Row progression: 732741, 7

Row estimates
- res_id (=): 7
- res_model (=): 14652
- res_field (null): 393482
- id (sort): 1

Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- url
2 min < 0.1% 8 ms 11,845 odoo
INSERT INTO "mail_message" ("id", "create_uid", "create_date", "write_uid", "write_date", "add_sign", "author_id", "body", "date", "email_from", "email_layout_xmlid", "is_internal", "message_id", "message_type", "model", "parent_id", "record_name", "reply_to", "res_id", "subject", "subtype_id") VALUES (nextval($1), $2, (now() at time zone $3), $4, (now() at time zone $5), $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21) RETURNING id
2 min < 0.1% 153 ms 606 odoo
SELECT "account_analytic_line".id FROM "account_analytic_line" WHERE ((("account_analytic_line"."so_line" in ($1,$2)) AND ("account_analytic_line"."amount" <= $3)) AND "account_analytic_line"."project_id" IS NOT NULL) AND ("account_analytic_line"."company_id" IS NULL  OR ("account_analytic_line"."company_id" in ($4))) ORDER BY  "account_analytic_line"."date" DESC,"account_analytic_line"."id" DESC
2 min < 0.1% 2 ms 38,673 odoo
SELECT "mail_activity".id FROM "mail_activity" WHERE (("mail_activity"."res_model" = $1) AND ("mail_activity"."res_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81))) ORDER BY  "mail_activity"."date_deadline" ASC
Covered by index on (res_id)
Rows: 27891
Row progression: 27891, 1

Row estimates
- res_id (=): 1
- res_model (=): 1550
- date_deadline (sort): 45

Existing indexes
- id PRIMARY
- date_deadline
- res_id
- res_model
- res_model_id
- user_id
2 min < 0.1% 0 ms 2,451,015 odoo
SELECT "ir_model_fields_selection".id FROM "ir_model_fields_selection" WHERE ("ir_model_fields_selection"."field_id" in ($1)) ORDER BY  "ir_model_fields_selection"."sequence" ,"ir_model_fields_selection"."id"
Covered by index on (field_id, value)
Rows: 2519
Row progression: 2519, 4

Row estimates
- field_id (=): 4
- sequence (sort): 52
- id (sort): 1

Existing indexes
- id PRIMARY
- field_id, value UNIQUE
1 min < 0.1% 0 ms 5,304,546 odoo
SELECT "ir_rule"."id" as "id", "ir_rule"."name" as "name", "ir_rule"."active" as "active", "ir_rule"."model_id" as "model_id", "ir_rule"."domain_force" as "domain_force", "ir_rule"."perm_read" as "perm_read", "ir_rule"."perm_write" as "perm_write", "ir_rule"."perm_create" as "perm_create", "ir_rule"."perm_unlink" as "perm_unlink", "ir_rule"."global" as "global", "ir_rule"."create_uid" as "create_uid", "ir_rule"."create_date" as "create_date", "ir_rule"."write_uid" as "write_uid", "ir_rule"."write_date" as "write_date" FROM "ir_rule" WHERE "ir_rule".id IN ($1)
1 min < 0.1% 0 ms 3,372,731 odoo
SELECT MAX(CASE WHEN perm_create THEN $1 ELSE $2 END)
                                  FROM ir_model_access a
                                  JOIN ir_model m ON (m.id = a.model_id)
                                 WHERE a.group_id IS NULL
                                   AND m.model = $3
                                   AND a.active IS TRUE
1 min < 0.1% 0 ms 1,110,485 odoo
SELECT f.name, d.json_value
                    FROM ir_default d
                    JOIN ir_model_fields f ON d.field_id=f.id
                    WHERE f.model=$1
                        AND (d.user_id IS NULL OR d.user_id=$2)
                        AND (d.company_id IS NULL OR d.company_id=$3)
                        AND d.condition IS NULL
                    ORDER BY d.user_id, d.company_id, d.id
1 min < 0.1% 0 ms 6,715,251 odoo
SELECT * FROM ir_translation
                    WHERE lang=$1 AND type=$2 AND name=$3 AND res_id IN ($4)
1 min < 0.1% 0 ms 1,479,781 odoo
UPDATE "bus_presence" SET "last_poll"=$1,"last_presence"=$2 WHERE id IN ($3)
1 min < 0.1% 5 ms 17,255 odoo
SELECT min("division_budget".id) AS id, count("division_budget".id) AS "date_from_count" , sum("division_budget"."amount") AS "amount",date_trunc($1, "division_budget"."date_from"::timestamp) as "date_from" 
            FROM "division_budget"
            WHERE ((("division_budget"."account_id" = $2) AND ("division_budget"."date_from" >= $3)) AND ("division_budget"."date_from" <= $4))
            GROUP BY date_trunc('month', "division_budget"."date_from"::timestamp)
            ORDER BY "date_from"
Details
CREATE INDEX CONCURRENTLY ON division_budget (account_id, date_from)
Rows: 37266
Row progression: 37266, 293, 32

Row estimates
- account_id (=): 293
- date_from (>=): 4013
- date_from (<=): 4013
- date_from (sort): 2867

Existing indexes
- id PRIMARY
1 min < 0.1% 111 ms 689 odoo
SELECT res_partner.id
                         FROM "res_partner"
                       WHERE (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $1 ) OR ("res_partner"."company_id" in ($2))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $3) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR (("res_partner"."type" = $4) AND ("res_partner"."create_uid" = $5)))) AND  (res_partner.email ilike $6
                           OR res_partner.display_name ilike $7
                           OR res_partner.ref ilike $8
                           OR res_partner.vat ilike $9)
                           -- don't panic, trust postgres bitmap
                     ORDER BY  res_partner.display_name ilike $10 desc,
                              res_partner.display_name