PgHero

Queries

Total Time Average Time Calls
72,050 min 48% 7,258 ms 595,629 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE (("stock_move"."scrapped" IS NULL or "stock_move"."scrapped" = $1 )  AND  ("stock_move"."raw_material_production_id" in ($2))) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
15,751 min 10% 9,292 ms 101,704 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE (("stock_move"."scrapped" IS NULL or "stock_move"."scrapped" = $1 )  AND  ("stock_move"."production_id" in ($2))) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
12,682 min 8% 5,894 ms 129,095 odoo
SELECT "product_product".id FROM "product_template" as "product_product__product_tmpl_id","product_product" WHERE ("product_product"."product_tmpl_id"="product_product__product_tmpl_id"."id") AND ((("product_product"."active" = $1)  AND  ("product_product__product_tmpl_id"."id" in (WITH temp_irt_current (id, name) as (
                            SELECT ct.id, coalesce(it.value,ct."name")
                            FROM product_template ct
                            LEFT JOIN ir_translation it ON (it.name = $2 and
                                        it.lang = $3 and
                                        it.type = $4 and
                                        it.res_id = ct.id and
                                        it.value != $5)
                            )
                            SELECT id FROM temp_irt_current WHERE name ilike $6 order by name
                            )))  AND  ($7 OR "product_product"."id" IS NULL)) ORDER BY "product_product"."default_code" ,"product_product"."id"   limit $8
12,064 min 8% 12,293 ms 58,883 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id"),"stock_location" as "stock_move__location_dest_id" WHERE ("stock_move"."inventory_id" in ($1)) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($2)))  OR  "stock_move__location_dest_id"."company_id" IS NULL ) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
7,127 min 5% 589 ms 726,322 odoo
SELECT "queue_job".id FROM "queue_job" WHERE ((("queue_job"."state" = $1)  AND  ("queue_job"."date_created" > $2))  AND  (("queue_job"."name" not in ($3,$4,$5,$6,$7,$8,$9)) OR "queue_job"."name" IS NULL)) ORDER BY "queue_job"."date_created"
5,426 min 4% 513 ms 634,339 odoo
SELECT "queue_job".id FROM "queue_job" WHERE ((("queue_job"."state" = $1)  AND  ("queue_job"."date_created" > $2))  AND  ("queue_job"."name" in ($3,$4,$5,$6,$7))) ORDER BY "queue_job"."date_created"
Covered by index on (name, date_created)
Rows: 502652
Row progression: 502652, 23936, 2394

Row estimates
- name (=): 23936
- date_created (>): 50265
- state (=): 125663
- date_created (sort): 2

Existing indexes
- id PRIMARY
- channel
- company_id
- identity_key WHERE ((state)::text = ANY (ARRAY[('pending'::character varying)::text, ('enqueued'::character varying)::text])) AND (identity_key IS NOT NULL)
- name, date_created
- state
- uuid
3,624 min 2% 11,200 ms 19,417 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE ("stock_move"."sale_line_id" in ($1)) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
3,572 min 2% 11,246 ms 19,060 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE ("stock_move"."sale_line_id" in ($1,$2)) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
2,507 min 2% 4,565 ms 32,947 odoo
SELECT min("sale_report".id) AS id, count("sale_report".id) AS "product_id_count" , sum("sale_report"."product_uom_qty") AS "product_uom_qty" ,"sale_report"."product_id" as "product_id" 
            FROM "sale_report" LEFT JOIN "product_product" as "sale_report__product_id" ON ("sale_report"."product_id" = "sale_report__product_id"."id")
            WHERE (("sale_report"."state" in ($1,$2))  AND  ("sale_report"."product_id" in ($3))) AND ("sale_report"."company_id" IS NULL   OR  ("sale_report"."company_id" in ($4)))
            GROUP BY "sale_report"."product_id","sale_report__product_id"."default_code","sale_report__product_id"."id"
            ORDER BY  "sale_report__product_id"."default_code" ,"sale_report__product_id"."id"
1,786 min 1% 10,735 ms 9,981 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE ("stock_move"."sale_line_id" in ($1,$2,$3)) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
1,461 min 1.0% 191 ms 460,009 odoo
UPDATE "product_product" SET "write_uid"=$1,"write_date"=(now() at time zone $2) WHERE id IN ($3)
Covered by index on (id)
Rows: 1000206
Row progression: 1000206, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- active, default_code
- barcode UNIQUE
- default_code
- product_tmpl_id
1,330 min 0.9% 445 ms 179,220 odoo
SELECT "account_invoice".id FROM "account_invoice" WHERE ((("account_invoice"."origin"::text like $1)  AND  ("account_invoice"."company_id" = $2))  AND  ("account_invoice"."type" in ($3,$4))) ORDER BY "account_invoice"."date_invoice" DESC,"account_invoice"."number" DESC,"account_invoice"."id" DESC
1,295 min 0.9% 258 ms 301,304 odoo
SELECT "product_product".id FROM "product_template" as "product_product__product_tmpl_id","product_product" WHERE ("product_product"."product_tmpl_id"="product_product__product_tmpl_id"."id") AND (("product_product"."active" = $1)  AND  ("product_product__product_tmpl_id"."id" in (WITH temp_irt_current (id, name) as (
                            SELECT ct.id, coalesce(it.value,ct."name")
                            FROM product_template ct
                            LEFT JOIN ir_translation it ON (it.name = $2 and
                                        it.lang = $3 and
                                        it.type = $4 and
                                        it.res_id = ct.id and
                                        it.value != $5)
                            )
                            SELECT id FROM temp_irt_current WHERE name = $6 order by name
                            ))) ORDER BY "product_product"."default_code" ,"product_product"."id"   limit $7
916 min 0.6% 10,667 ms 5,155 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE ("stock_move"."sale_line_id" in ($1,$2,$3,$4)) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
912 min 0.6% 11,774 ms 4,650 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE (("stock_move"."scrapped" IS NULL or "stock_move"."scrapped" = $1 )  AND  ("stock_move"."raw_material_production_id" in ($2,$3))) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
563 min 0.4% 42 ms 805,204 odoo
SELECT "material_requisition_line".id FROM "material_requisition_line" WHERE ("material_requisition_line"."product_id" in ($1)) ORDER BY "material_requisition_line"."id"
Details
CREATE INDEX CONCURRENTLY ON material_requisition_line (product_id)
Rows: 32303
Row progression: 32303, 36

Row estimates
- product_id (=): 36
- id (sort): 1

Existing indexes
- id PRIMARY
320 min 0.2% 3,085 ms 6,228 odoo
UPDATE "material_requisition" SET "state"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 819
Row progression: 819, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
302 min 0.2% 5,207 ms 3,483 odoo
SELECT min("mrp_production".id) AS id, count("mrp_production".id) AS "picking_type_id_count" , "mrp_production"."picking_type_id" as "picking_type_id" 
            FROM "mrp_production" LEFT JOIN "stock_picking_type" as "mrp_production__picking_type_id" ON ("mrp_production"."picking_type_id" = "mrp_production__picking_type_id"."id")
            WHERE ((("mrp_production"."availability" = $1)  AND  (("mrp_production"."state" not in ($2,$3)) OR "mrp_production"."state" IS NULL))  AND  ("mrp_production"."picking_type_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))) AND (("mrp_production"."company_id" in ($39))  OR  "mrp_production"."company_id" IS NULL )
            GROUP BY "mrp_production"."picking_type_id","mrp_production__picking_type_id"."sequence","mrp_production__picking_type_id"."id"
            ORDER BY  "mrp_production__picking_type_id"."sequence" ,"mrp_production__picking_type_id"."id"
270 min 0.2% 8 ms 2,053,008 odoo
SELECT "mrp_bom".id FROM "mrp_bom" LEFT JOIN "product_product" as "mrp_bom__product_id" ON ("mrp_bom"."product_id" = "mrp_bom__product_id"."id") WHERE ((("mrp_bom"."active" = $1)  AND  (("mrp_bom"."product_id" = $2)  OR  ("mrp_bom"."product_id" IS NULL   AND  ("mrp_bom"."product_tmpl_id" = $3))))  AND  ("mrp_bom"."company_id" = $4)) ORDER BY "mrp_bom"."sequence" ,"mrp_bom__product_id"."default_code" ,"mrp_bom__product_id"."id"   limit $5
254 min 0.2% 4,377 ms 3,483 odoo
SELECT min("mrp_production".id) AS id, count("mrp_production".id) AS "picking_type_id_count" , "mrp_production"."picking_type_id" as "picking_type_id" 
            FROM "mrp_production" LEFT JOIN "stock_picking_type" as "mrp_production__picking_type_id" ON ("mrp_production"."picking_type_id" = "mrp_production__picking_type_id"."id")
            WHERE ((("mrp_production"."state" in ($1,$2,$3))  AND  (("mrp_production"."state" not in ($4,$5)) OR "mrp_production"."state" IS NULL))  AND  ("mrp_production"."picking_type_id" in ($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))) AND (("mrp_production"."company_id" in ($41))  OR  "mrp_production"."company_id" IS NULL )
            GROUP BY "mrp_production"."picking_type_id","mrp_production__picking_type_id"."sequence","mrp_production__picking_type_id"."id"
            ORDER BY  "mrp_production__picking_type_id"."sequence" ,"mrp_production__picking_type_id"."id"
220 min 0.1% 1,269 ms 10,396 odoo
SELECT "sale_order".id FROM "sale_order" WHERE ((("sale_order"."partner_id" = $1)  AND  ("sale_order"."brand_id" = $2))  AND  ("sale_order"."create_date" < $3)) ORDER BY "sale_order"."date_order" DESC,"sale_order"."id" DESC  limit $4
Covered by index on (partner_id)
Rows: 790297
Row progression: 790297, 8

Row estimates
- partner_id (=): 8
- brand_id (=): 10399
- create_date (<): 79030
- date_order (sort): 1

Existing indexes
- id PRIMARY
- brand_id
- code
- confirmation_date
- create_date
- date_order
- deliverect_id UNIQUE
- dh_token UNIQUE
- fo_state
- instashop_id UNIQUE
- name
- partner_id
- platform_id
- state
- user_id
- zomato_id UNIQUE
206 min 0.1% 3,548 ms 3,483 odoo
SELECT min("mrp_production".id) AS id, count("mrp_production".id) AS "picking_type_id_count" , "mrp_production"."picking_type_id" as "picking_type_id" 
            FROM "mrp_production" LEFT JOIN "stock_picking_type" as "mrp_production__picking_type_id" ON ("mrp_production"."picking_type_id" = "mrp_production__picking_type_id"."id")
            WHERE (((("mrp_production"."date_planned_start" < $1)  AND  ("mrp_production"."state" = $2))  AND  (("mrp_production"."state" not in ($3,$4)) OR "mrp_production"."state" IS NULL))  AND  ("mrp_production"."picking_type_id" in ($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))) AND (("mrp_production"."company_id" in ($40))  OR  "mrp_production"."company_id" IS NULL )
            GROUP BY "mrp_production"."picking_type_id","mrp_production__picking_type_id"."sequence","mrp_production__picking_type_id"."id"
            ORDER BY  "mrp_production__picking_type_id"."sequence" ,"mrp_production__picking_type_id"."id"
206 min 0.1% 21 ms 602,584 odoo
SELECT "product_uom".id FROM "product_uom" WHERE (("product_uom"."active" = $1)  AND  ("product_uom"."id" in (WITH temp_irt_current (id, name) as (
                            SELECT ct.id, coalesce(it.value,ct."name")
                            FROM product_uom ct
                            LEFT JOIN ir_translation it ON (it.name = $2 and
                                        it.lang = $3 and
                                        it.type = $4 and
                                        it.res_id = ct.id and
                                        it.value != $5)
                            )
                            SELECT id FROM temp_irt_current WHERE name = $6 order by name
                            ))) ORDER BY "product_uom"."name"   limit $7
199 min 0.1% 14 ms 881,704 odoo
SELECT "product_delivery_rule".id FROM "product_delivery_rule" WHERE ((("product_delivery_rule"."kitchen_id" = $1)  AND  ("product_delivery_rule"."product_id" = $2))  AND  ("product_delivery_rule"."pause" IS NULL or "product_delivery_rule"."pause" = $3 )) AND $4 ORDER BY "product_delivery_rule"."id"
188 min 0.1% 5 ms 2,093,147 odoo
SELECT "product_product".id FROM "product_product" WHERE (("product_product"."active" = $1)  AND  ("product_product"."product_tmpl_id" in ($2))) ORDER BY "product_product"."default_code" ,"product_product"."id"
Covered by index on (product_tmpl_id)
Rows: 1000206
Row progression: 1000206, 620, 310

Row estimates
- product_tmpl_id (=): 620
- active (=): 500103
- default_code (sort): 0
- id (sort): 1

Existing indexes
- id PRIMARY
- active, default_code
- barcode UNIQUE
- default_code
- product_tmpl_id
169 min 0.1% 19,068 ms 532 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id"),"stock_location" as "stock_move__location_dest_id" WHERE (("stock_move"."scrapped" IS NULL or "stock_move"."scrapped" = $1 )  AND  ("stock_move"."raw_material_production_id" in ($2))) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($3)))  OR  "stock_move__location_dest_id"."company_id" IS NULL ) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
158 min 0.1% 74 ms 129,095 odoo
SELECT "product_product".id FROM "product_product" WHERE (("product_product"."active" = $1)  AND  ("product_product"."default_code"::text ilike $2)) ORDER BY "product_product"."default_code" ,"product_product"."id"   limit $3
131 min < 0.1% 16,980 ms 463 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_dest_id","stock_location" as "stock_move__location_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ('done','cancel','draft')) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_id" in (1022520,1004893,1004894,1005024,1005250,1005254,1005258,1005570,1005571,1005583,1006438,960282,889236,889239,889242,889278,889310,889350,889369,1006704,1006772,1006773,889555,889570,1007671,889638,1007674,1007776,981124,889650,1007785,981128,960514,960518,889675,889680,889687,889696,981201,981203,981205,981210,981217,890123,890131,890134,890142,890149,890152,981255,890165,890419,890430,890468,981281,890479,981284,981287,981291,981292,981322,981324,981325,981327,981328,981329,981332,981463,981464,981465,981467,1010202,981478,981483,981488,890979,890987,891003,981563,981565,981569,981571,981573,981577,892007,946062,946075,946076,946078,946080,946087,981849,981851,981852,981871,946154,946160,946166,946169,946178,981918,981921,946295,883071,982059,982108,982211,982237,982243,982245,982343,894615,982405,900718,901024,982454,901418,982518,1017515,1017680,1017683,982548,967065,902460,1018626,982582,982642,1018677,982650,982656,982694,983195,983197,1018755,983247,983253,983258,983271,983288,1018788,1018794,983363,983365,983372,983387,983388,983396,983404,983406,983416,983432,1018823,983486,983493,1018844,983638,905268,1018847,1018848,1018849,983646,1018850,983647,983711,983722,983778,983803,1021485,983823,1018883,983841,1018922,1018929,1018930,1019052,1019097,1019110,1019128,1019133,1019135,1019136,1019137,1019138,1019145,1019146,767640,1019149,1019156,1019159,1019166,1019170,1019177,1019178,1019181,1019183,1019184,1019185,1019186,1019213,1019214,1019329,1019340,1019352,1019367,1019376,1019381,1019446,1019447,1019450,984083,1019493,1019510,1019520,1019524,1019531,1019534,1021881,1021882,984294,984295,984296,1021885,984309,984324,1021891,1021894,984596,984597,984598,984599,984620,1021898,984638,984639,984760,984762,984784,984795,985149,985158,985162,985169,985184,985377,985385,985389,985523,985534,985677,985696,985735,985749,985756,985758,985759,985763,985772,985877,985887,985907,978503,986080,986120,1022922,986489,986699,986700,986701,986703,986704,979343,986975,986981,986982,987057,987058,987360,987363,987370,987371,987372,987373,987637,979383,979395,988150,988183,979411,988880,989752,989772,989831,991769,878758,878983,878990,979671,879786,879833,879841,926511,993599,927920,993644,879902,993995,879934,994060,980660,880883,880888,910992,881344,881345,979819,979821,979825,881370,979829,979836,979838,881420,881738,881751,881781,979885,994506,930548,881838,881844,994533,994547,882282,882287,994688,994693,1023605,994699,994704,1023608,994714,994715,882986,883022,995523,995565,1020280,1020400,1021470,1021471,995892,1021472,1021475,1021480,996654,1021483,1021484,1021482,1021486,1021487,1021488,1021489,996881,1021494,1021495,1021496,1021493,1021498,1021499,1021500,1021501,1021502,1021503,1021506,996892,1021508,1021507,1021510,996896,1021517,1021516,1021873,1021874,1021875,1021876,1021877,1021878,1021879,1021880,980438,980435,1021883,1021884,996925,1021886,1021887,1021888,980455,1021890,1021889,1021892,1021893,980457,1021895,980463,1021897,1021896,1021899,1021900,1021901,997835,1021902,1021904,1021905,1021903,980489,885705,1022118,1022119,1021906,1022514,1022518,1022521,1022523,886249,1022527,1022529,1022530,1022531,1022532,1022533,1022534,1022535,1022537,1022538,1022539,1022540,886272,1022542,1022547,1022548,1022551,1022552,886312,1022555,886303,1022556,1022559,1022560,1022561,1022597,1022557,1022695,980547,886386,1022781,1022868,1022869,951003,1022598,1022953,951006,951005,1022957,1022962,951009,951008,1022965,886461,1022955,886555,1022970,1022971,980582,1022973,1022974,1022976,1023017,1023020,1023021,1023022,1023023,1023024,1023025,1023026,935163,1023028,1023029,1023067,1023027,1023071,1023115,1023195,1023198,1023202,1023205,1023206,1023207,1023208,1023261,1023262,1023263,1023265,1023425,1023583,1023587,1023589,1023590,887148,1023594,1023601,1023603,887161,1023604,980656,953083,1023607,953091,953098,1023616,1023618,1023619,1023620,1023621,980679,1023609,1023625,1023612,980676,1023630,1023631,1023632,1023633,1023636,980694,1023639,1023640,1023641,1023644,1023645,887342,1023648,1023647,1023656,1023655,1023658,1023657,1023793,1023794,1023804,1023808,1023814,1023817,887389,1024059,1023849,1023850,1023852,998629,1023920,1024016,1023876,1024060,980760,1000097,1024106,1024110,1024111,1024112,1024109,999913,1024254,1024260,1024278,1000716,1024280,1024281,1024289,1024290,1024292,1024300,1000856,1024316,1024329,887456,1024328,1024340,1024331,980862,1024339,1001036,1024360,1024384,1024385,980866,1024367,1024369,980873,1025274,1025294,980881,980892,980896,980899,980902,888006,1024288,980924,980925,980931,888068,1002460,980938,1002668,1002877,980965,1003708,1003712,1003713,888180,888185,1004889,1004890,1004891,1004892)))  AND  (((((("stock_move__location_dest_id"."parent_left" >= 88)  AND  ("stock_move__location_dest_id"."parent_left" < 89))  OR  (("stock_move__location_dest_id"."parent_left" >= 746)  AND  ("stock_move__location_dest_id"."parent_left" < 747)))  OR  (("stock_move__location_dest_id"."parent_left" >= 748)  AND  ("stock_move__location_dest_id"."parent_left" < 749)))  OR  (("stock_move__location_dest_id"."parent_left" >= 750)  AND  ("stock_move__location_dest_id"."parent_left" < 751)))  OR  ("stock_move"."location_dest_id" in (605))))  AND  (((((("stock_move__location_id"."parent_left" < 88)  OR  ("stock_move__location_id"."parent_left" >= 89))  AND  (("stock_move__location_id"."parent_left" < 746)  OR  ("stock_move__location_id"."parent_left" >= 747)))  AND  (("stock_move__location_id"."parent_left" < 748)  OR  ("stock_move__location_id"."parent_left" >= 749)))  AND  (("stock_move__location_id"."parent_left" < 750)  OR  ("stock_move__location_id"."parent_left" >= 751)))  AND  (NOT (("stock_move"."location_id" in (605))))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
126 min < 0.1% 16,389 ms 460 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  (((((("stock_move__location_id"."parent_left" >= $629)  AND  ("stock_move__location_id"."parent_left" < $630))  OR  (("stock_move__location_id"."parent_left" >= $631)  AND  ("stock_move__location_id"."parent_left" < $632)))  OR  (("stock_move__location_id"."parent_left" >= $633)  AND  ("stock_move__location_id"."parent_left" < $634)))  OR  (("stock_move__location_id"."parent_left" >= $635)  AND  ("stock_move__location_id"."parent_left" < $636)))  OR  ("stock_move"."location_id" in ($637))))  AND  (((((("stock_move__location_dest_id"."parent_left" < $638)  OR  ("stock_move__location_dest_id"."parent_left" >= $639))  AND  (("stock_move__location_dest_id"."parent_left" < $640)  OR  ("stock_move__location_dest_id"."parent_left" >= $641)))  AND  (("stock_move__location_dest_id"."parent_left" < $642)  OR  ("stock_move__location_dest_id"."parent_left" >= $643)))  AND  (("stock_move__location_dest_id"."parent_left" < $644)  OR  ("stock_move__location_dest_id"."parent_left" >= $645)))  AND  (NOT (("stock_move"."location_dest_id" in ($646))))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
124 min < 0.1% 15,943 ms 467 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  ((((((((((((("stock_move__location_id"."parent_left" >= $629)  AND  ("stock_move__location_id"."parent_left" < $630))  OR  (("stock_move__location_id"."parent_left" >= $631)  AND  ("stock_move__location_id"."parent_left" < $632)))  OR  (("stock_move__location_id"."parent_left" >= $633)  AND  ("stock_move__location_id"."parent_left" < $634)))  OR  (("stock_move__location_id"."parent_left" >= $635)  AND  ("stock_move__location_id"."parent_left" < $636)))  OR  (("stock_move__location_id"."parent_left" >= $637)  AND  ("stock_move__location_id"."parent_left" < $638)))  OR  (("stock_move__location_id"."parent_left" >= $639)  AND  ("stock_move__location_id"."parent_left" < $640)))  OR  (("stock_move__location_id"."parent_left" >= $641)  AND  ("stock_move__location_id"."parent_left" < $642)))  OR  (("stock_move__location_id"."parent_left" >= $643)  AND  ("stock_move__location_id"."parent_left" < $644)))  OR  (("stock_move__location_id"."parent_left" >= $645)  AND  ("stock_move__location_id"."parent_left" < $646)))  OR  (("stock_move__location_id"."parent_left" >= $647)  AND  ("stock_move__location_id"."parent_left" < $648)))  OR  (("stock_move__location_id"."parent_left" >= $649)  AND  ("stock_move__location_id"."parent_left" < $650)))  OR  (("stock_move__location_id"."parent_left" >= $651)  AND  ("stock_move__location_id"."parent_left" < $652))))  AND  ((((((((((((("stock_move__location_dest_id"."parent_left" < $653)  OR  ("stock_move__location_dest_id"."parent_left" >= $654))  AND  (("stock_move__location_dest_id"."parent_left" < $655)  OR  ("stock_move__location_dest_id"."parent_left" >= $656)))  AND  (("stock_move__location_dest_id"."parent_left" < $657)  OR  ("stock_move__location_dest_id"."parent_left" >= $658)))  AND  (("stock_move__location_dest_id"."parent_left" < $659)  OR  ("stock_move__location_dest_id"."parent_left" >= $660)))  AND  (("stock_move__location_dest_id"."parent_left" < $661)  OR  ("stock_move__location_dest_id"."parent_left" >= $662)))  AND  (("stock_move__location_dest_id"."parent_left" < $663)  OR  ("stock_move__location_dest_id"."parent_left" >= $664)))  AND  (("stock_move__location_dest_id"."parent_left" < $665)  OR  ("stock_move__location_dest_id"."parent_left" >= $666)))  AND  (("stock_move__location_dest_id"."parent_left" < $667)  OR  ("stock_move__location_dest_id"."parent_left" >= $668)))  AND  (("stock_move__location_dest_id"."parent_left" < $669)  OR  ("stock_move__location_dest_id"."parent_left" >= $670)))  AND  (("stock_move__location_dest_id"."parent_left" < $671)  OR  ("stock_move__location_dest_id"."parent_left" >= $672)))  AND  (("stock_move__location_dest_id"."parent_left" < $673)  OR  ("stock_move__location_dest_id"."parent_left" >= $674)))  AND  (("stock_move__location_dest_id"."parent_left" < $675)  OR  ("stock_move__location_dest_id"."parent_left" >= $676))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
124 min < 0.1% 17,160 ms 433 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_dest_id","stock_location" as "stock_move__location_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  (((((("stock_move__location_dest_id"."parent_left" >= $623)  AND  ("stock_move__location_dest_id"."parent_left" < $624))  OR  (("stock_move__location_dest_id"."parent_left" >= $625)  AND  ("stock_move__location_dest_id"."parent_left" < $626)))  OR  (("stock_move__location_dest_id"."parent_left" >= $627)  AND  ("stock_move__location_dest_id"."parent_left" < $628)))  OR  (("stock_move__location_dest_id"."parent_left" >= $629)  AND  ("stock_move__location_dest_id"."parent_left" < $630)))  OR  ("stock_move"."location_dest_id" in ($631))))  AND  (((((("stock_move__location_id"."parent_left" < $632)  OR  ("stock_move__location_id"."parent_left" >= $633))  AND  (("stock_move__location_id"."parent_left" < $634)  OR  ("stock_move__location_id"."parent_left" >= $635)))  AND  (("stock_move__location_id"."parent_left" < $636)  OR  ("stock_move__location_id"."parent_left" >= $637)))  AND  (("stock_move__location_id"."parent_left" < $638)  OR  ("stock_move__location_id"."parent_left" >= $639)))  AND  (NOT (("stock_move"."location_id" in ($640))))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
120 min < 0.1% 16,405 ms 439 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  ((((((((((((("stock_move__location_id"."parent_left" >= $623)  AND  ("stock_move__location_id"."parent_left" < $624))  OR  (("stock_move__location_id"."parent_left" >= $625)  AND  ("stock_move__location_id"."parent_left" < $626)))  OR  (("stock_move__location_id"."parent_left" >= $627)  AND  ("stock_move__location_id"."parent_left" < $628)))  OR  (("stock_move__location_id"."parent_left" >= $629)  AND  ("stock_move__location_id"."parent_left" < $630)))  OR  (("stock_move__location_id"."parent_left" >= $631)  AND  ("stock_move__location_id"."parent_left" < $632)))  OR  (("stock_move__location_id"."parent_left" >= $633)  AND  ("stock_move__location_id"."parent_left" < $634)))  OR  (("stock_move__location_id"."parent_left" >= $635)  AND  ("stock_move__location_id"."parent_left" < $636)))  OR  (("stock_move__location_id"."parent_left" >= $637)  AND  ("stock_move__location_id"."parent_left" < $638)))  OR  (("stock_move__location_id"."parent_left" >= $639)  AND  ("stock_move__location_id"."parent_left" < $640)))  OR  (("stock_move__location_id"."parent_left" >= $641)  AND  ("stock_move__location_id"."parent_left" < $642)))  OR  (("stock_move__location_id"."parent_left" >= $643)  AND  ("stock_move__location_id"."parent_left" < $644)))  OR  (("stock_move__location_id"."parent_left" >= $645)  AND  ("stock_move__location_id"."parent_left" < $646))))  AND  ((((((((((((("stock_move__location_dest_id"."parent_left" < $647)  OR  ("stock_move__location_dest_id"."parent_left" >= $648))  AND  (("stock_move__location_dest_id"."parent_left" < $649)  OR  ("stock_move__location_dest_id"."parent_left" >= $650)))  AND  (("stock_move__location_dest_id"."parent_left" < $651)  OR  ("stock_move__location_dest_id"."parent_left" >= $652)))  AND  (("stock_move__location_dest_id"."parent_left" < $653)  OR  ("stock_move__location_dest_id"."parent_left" >= $654)))  AND  (("stock_move__location_dest_id"."parent_left" < $655)  OR  ("stock_move__location_dest_id"."parent_left" >= $656)))  AND  (("stock_move__location_dest_id"."parent_left" < $657)  OR  ("stock_move__location_dest_id"."parent_left" >= $658)))  AND  (("stock_move__location_dest_id"."parent_left" < $659)  OR  ("stock_move__location_dest_id"."parent_left" >= $660)))  AND  (("stock_move__location_dest_id"."parent_left" < $661)  OR  ("stock_move__location_dest_id"."parent_left" >= $662)))  AND  (("stock_move__location_dest_id"."parent_left" < $663)  OR  ("stock_move__location_dest_id"."parent_left" >= $664)))  AND  (("stock_move__location_dest_id"."parent_left" < $665)  OR  ("stock_move__location_dest_id"."parent_left" >= $666)))  AND  (("stock_move__location_dest_id"."parent_left" < $667)  OR  ("stock_move__location_dest_id"."parent_left" >= $668)))  AND  (("stock_move__location_dest_id"."parent_left" < $669)  OR  ("stock_move__location_dest_id"."parent_left" >= $670))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
120 min < 0.1% 3 ms 2,657,022 odoo
SELECT "stock_location".id FROM "stock_location" WHERE ("stock_location"."parent_left" <= $1) AND ("stock_location"."company_id" IS NULL   OR  ("stock_location"."company_id" in ($2))) ORDER BY "stock_location"."parent_left"
119 min < 0.1% 7 ms 1,074,607 odoo
SELECT min("stock_quant".id) AS id, count("stock_quant".id) AS "product_id_count" , sum("stock_quant"."quantity") AS "quantity" ,"stock_quant"."product_id" as "product_id" 
            FROM "stock_location" as "stock_quant__location_id","stock_quant"
            WHERE ("stock_quant"."location_id"="stock_quant__location_id"."id") AND (("stock_quant"."product_id" in ($1))  AND  (("stock_quant__location_id"."parent_left" >= $2)  AND  ("stock_quant__location_id"."parent_left" < $3))) AND ("stock_quant"."company_id" IS NULL   OR  ("stock_quant"."company_id" in ($4)))
            GROUP BY "stock_quant"."product_id"
            ORDER BY "id"
118 min < 0.1% 16,798 ms 421 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  (((((("stock_move__location_id"."parent_left" >= $623)  AND  ("stock_move__location_id"."parent_left" < $624))  OR  (("stock_move__location_id"."parent_left" >= $625)  AND  ("stock_move__location_id"."parent_left" < $626)))  OR  (("stock_move__location_id"."parent_left" >= $627)  AND  ("stock_move__location_id"."parent_left" < $628)))  OR  (("stock_move__location_id"."parent_left" >= $629)  AND  ("stock_move__location_id"."parent_left" < $630)))  OR  ("stock_move"."location_id" in ($631))))  AND  (((((("stock_move__location_dest_id"."parent_left" < $632)  OR  ("stock_move__location_dest_id"."parent_left" >= $633))  AND  (("stock_move__location_dest_id"."parent_left" < $634)  OR  ("stock_move__location_dest_id"."parent_left" >= $635)))  AND  (("stock_move__location_dest_id"."parent_left" < $636)  OR  ("stock_move__location_dest_id"."parent_left" >= $637)))  AND  (("stock_move__location_dest_id"."parent_left" < $638)  OR  ("stock_move__location_dest_id"."parent_left" >= $639)))  AND  (NOT (("stock_move"."location_dest_id" in ($640))))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
112 min < 0.1% 968 ms 6,966 odoo
SELECT min("stock_picking".id) AS id, count("stock_picking".id) AS "picking_type_id_count" , "stock_picking"."picking_type_id" as "picking_type_id" 
            FROM "stock_picking" LEFT JOIN "stock_picking_type" as "stock_picking__picking_type_id" ON ("stock_picking"."picking_type_id" = "stock_picking__picking_type_id"."id")
            WHERE ((("stock_picking"."state" = $1)  AND  (("stock_picking"."state" not in ($2,$3)) OR "stock_picking"."state" IS NULL))  AND  ("stock_picking"."picking_type_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))) AND ("stock_picking"."company_id" IS NULL   OR  ("stock_picking"."company_id" in ($39)))
            GROUP BY "stock_picking"."picking_type_id","stock_picking__picking_type_id"."sequence","stock_picking__picking_type_id"."id"
            ORDER BY  "stock_picking__picking_type_id"."sequence" ,"stock_picking__picking_type_id"."id"
110 min < 0.1% 0 ms 80,079,664 odoo
SELECT id FROM "product_category" WHERE id IN ($1)
110 min < 0.1% 17,139 ms 384 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_dest_id","stock_location" as "stock_move__location_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  (((((("stock_move__location_dest_id"."parent_left" >= $611)  AND  ("stock_move__location_dest_id"."parent_left" < $612))  OR  (("stock_move__location_dest_id"."parent_left" >= $613)  AND  ("stock_move__location_dest_id"."parent_left" < $614)))  OR  (("stock_move__location_dest_id"."parent_left" >= $615)  AND  ("stock_move__location_dest_id"."parent_left" < $616)))  OR  (("stock_move__location_dest_id"."parent_left" >= $617)  AND  ("stock_move__location_dest_id"."parent_left" < $618)))  OR  ("stock_move"."location_dest_id" in ($619))))  AND  (((((("stock_move__location_id"."parent_left" < $620)  OR  ("stock_move__location_id"."parent_left" >= $621))  AND  (("stock_move__location_id"."parent_left" < $622)  OR  ("stock_move__location_id"."parent_left" >= $623)))  AND  (("stock_move__location_id"."parent_left" < $624)  OR  ("stock_move__location_id"."parent_left" >= $625)))  AND  (("stock_move__location_id"."parent_left" < $626)  OR  ("stock_move__location_id"."parent_left" >= $627)))  AND  (NOT (("stock_move"."location_id" in ($628))))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
109 min < 0.1% 2 ms 2,657,021 odoo
SELECT "stock_location".id FROM "stock_location" WHERE ("stock_location"."parent_right" >= $1) AND ("stock_location"."company_id" IS NULL   OR  ("stock_location"."company_id" in ($2))) ORDER BY "stock_location"."parent_left"
106 min < 0.1% 16,306 ms 389 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  ((((((((((((("stock_move__location_id"."parent_left" >= $611)  AND  ("stock_move__location_id"."parent_left" < $612))  OR  (("stock_move__location_id"."parent_left" >= $613)  AND  ("stock_move__location_id"."parent_left" < $614)))  OR  (("stock_move__location_id"."parent_left" >= $615)  AND  ("stock_move__location_id"."parent_left" < $616)))  OR  (("stock_move__location_id"."parent_left" >= $617)  AND  ("stock_move__location_id"."parent_left" < $618)))  OR  (("stock_move__location_id"."parent_left" >= $619)  AND  ("stock_move__location_id"."parent_left" < $620)))  OR  (("stock_move__location_id"."parent_left" >= $621)  AND  ("stock_move__location_id"."parent_left" < $622)))  OR  (("stock_move__location_id"."parent_left" >= $623)  AND  ("stock_move__location_id"."parent_left" < $624)))  OR  (("stock_move__location_id"."parent_left" >= $625)  AND  ("stock_move__location_id"."parent_left" < $626)))  OR  (("stock_move__location_id"."parent_left" >= $627)  AND  ("stock_move__location_id"."parent_left" < $628)))  OR  (("stock_move__location_id"."parent_left" >= $629)  AND  ("stock_move__location_id"."parent_left" < $630)))  OR  (("stock_move__location_id"."parent_left" >= $631)  AND  ("stock_move__location_id"."parent_left" < $632)))  OR  (("stock_move__location_id"."parent_left" >= $633)  AND  ("stock_move__location_id"."parent_left" < $634))))  AND  ((((((((((((("stock_move__location_dest_id"."parent_left" < $635)  OR  ("stock_move__location_dest_id"."parent_left" >= $636))  AND  (("stock_move__location_dest_id"."parent_left" < $637)  OR  ("stock_move__location_dest_id"."parent_left" >= $638)))  AND  (("stock_move__location_dest_id"."parent_left" < $639)  OR  ("stock_move__location_dest_id"."parent_left" >= $640)))  AND  (("stock_move__location_dest_id"."parent_left" < $641)  OR  ("stock_move__location_dest_id"."parent_left" >= $642)))  AND  (("stock_move__location_dest_id"."parent_left" < $643)  OR  ("stock_move__location_dest_id"."parent_left" >= $644)))  AND  (("stock_move__location_dest_id"."parent_left" < $645)  OR  ("stock_move__location_dest_id"."parent_left" >= $646)))  AND  (("stock_move__location_dest_id"."parent_left" < $647)  OR  ("stock_move__location_dest_id"."parent_left" >= $648)))  AND  (("stock_move__location_dest_id"."parent_left" < $649)  OR  ("stock_move__location_dest_id"."parent_left" >= $650)))  AND  (("stock_move__location_dest_id"."parent_left" < $651)  OR  ("stock_move__location_dest_id"."parent_left" >= $652)))  AND  (("stock_move__location_dest_id"."parent_left" < $653)  OR  ("stock_move__location_dest_id"."parent_left" >= $654)))  AND  (("stock_move__location_dest_id"."parent_left" < $655)  OR  ("stock_move__location_dest_id"."parent_left" >= $656)))  AND  (("stock_move__location_dest_id"."parent_left" < $657)  OR  ("stock_move__location_dest_id"."parent_left" >= $658))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
103 min < 0.1% 16,491 ms 376 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  (((((("stock_move__location_id"."parent_left" >= $611)  AND  ("stock_move__location_id"."parent_left" < $612))  OR  (("stock_move__location_id"."parent_left" >= $613)  AND  ("stock_move__location_id"."parent_left" < $614)))  OR  (("stock_move__location_id"."parent_left" >= $615)  AND  ("stock_move__location_id"."parent_left" < $616)))  OR  (("stock_move__location_id"."parent_left" >= $617)  AND  ("stock_move__location_id"."parent_left" < $618)))  OR  ("stock_move"."location_id" in ($619))))  AND  (((((("stock_move__location_dest_id"."parent_left" < $620)  OR  ("stock_move__location_dest_id"."parent_left" >= $621))  AND  (("stock_move__location_dest_id"."parent_left" < $622)  OR  ("stock_move__location_dest_id"."parent_left" >= $623)))  AND  (("stock_move__location_dest_id"."parent_left" < $624)  OR  ("stock_move__location_dest_id"."parent_left" >= $625)))  AND  (("stock_move__location_dest_id"."parent_left" < $626)  OR  ("stock_move__location_dest_id"."parent_left" >= $627)))  AND  (NOT (("stock_move"."location_dest_id" in ($628))))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
89 min < 0.1% 2 ms 2,535,897 odoo
UPDATE "stock_quant" SET "commissary_quantity"= $1,"commissary_reserved"=$2,"write_uid"=$3,"write_date"=(now() at time zone $4) WHERE id IN ($5)
Covered by index on (id)
Rows: 2772386
Row progression: 2772386, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- lot_id
- product_id
88 min < 0.1% 254 ms 20,754 odoo
SELECT "stock_inventory_line".id FROM "stock_inventory_line" WHERE ("stock_inventory_line"."prod_lot_id" in ($1)) ORDER BY "stock_inventory_line"."id"
Details
CREATE INDEX CONCURRENTLY ON stock_inventory_line (prod_lot_id)
Rows: 96034
Row progression: 96034, 2

Row estimates
- prod_lot_id (=): 2
- id (sort): 1

Existing indexes
- id PRIMARY
- company_id
- inventory_id
- location_id
- package_id
- product_id
85 min < 0.1% 10 ms 521,504 odoo
SELECT "mrp_bom".id FROM "mrp_bom" WHERE ((("mrp_bom"."active" = $1)  AND  "mrp_bom"."product_id" IS NULL )  AND  ("mrp_bom"."product_tmpl_id" = $2)) ORDER BY "mrp_bom"."sequence"   limit $3
Details
CREATE INDEX CONCURRENTLY ON mrp_bom (product_tmpl_id)
Rows: 8402
Row progression: 8402, 1

Row estimates
- product_tmpl_id (=): 1
- active (=): 4201
- product_id (null): 8385
- sequence (sort): 8402

Existing indexes
- id PRIMARY
76 min < 0.1% 3 ms 1,682,390 odoo
SELECT "stock_location".id FROM "stock_location" WHERE ("stock_location"."parent_left" <= $1) ORDER BY "stock_location"."parent_left"
Covered by index on (parent_left)
Rows: 523
Row progression: 523, 52

Row estimates
- parent_left (<=): 52
- parent_left (sort): 1

Existing indexes
- id PRIMARY
- barcode, company_id UNIQUE
- company_id
- location_id
- parent_left
- parent_right
- usage
75 min < 0.1% 5 ms 873,231 odoo
SELECT "stock_quant".id FROM "stock_quant" WHERE ("stock_quant"."product_id" in ($1)) ORDER BY "stock_quant"."id"
Covered by index on (product_id)
Rows: 2772386
Row progression: 2772386, 32

Row estimates
- product_id (=): 32
- id (sort): 1

Existing indexes
- id PRIMARY
- lot_id
- product_id
69 min < 0.1% 86 ms 47,767 odoo
SELECT "purchase_order_line".id FROM "purchase_order_line" LEFT JOIN "purchase_order" as "purchase_order_line__order_id" ON ("purchase_order_line"."order_id" = "purchase_order_line__order_id"."id") WHERE (("purchase_order_line"."state" in ($1,$2))  AND  ("purchase_order_line"."product_id" in ($3))) AND ("purchase_order_line"."company_id" IS NULL   OR  ("purchase_order_line"."company_id" in ($4))) ORDER BY "purchase_order_line__order_id"."date_order" DESC,"purchase_order_line__order_id"."id" DESC,"purchase_order_line"."sequence" ,"purchase_order_line"."id"
65 min < 0.1% 17 ms 224,758 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_id"="stock_move__location_id"."id" AND "stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_id" in ($4)))  AND  (("stock_move__location_id"."parent_left" >= $5)  AND  ("stock_move__location_id"."parent_left" < $6)))  AND  (("stock_move__location_dest_id"."parent_left" < $7)  OR  ("stock_move__location_dest_id"."parent_left" >= $8))) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($9)))  OR  "stock_move__location_dest_id"."company_id" IS NULL )
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
65 min < 0.1% 0 ms 20,136,017 odoo
DISCARD ALL
59 min < 0.1% 1,012 ms 3,483 odoo
SELECT min("stock_picking".id) AS id, count("stock_picking".id) AS "picking_type_id_count" , "stock_picking"."picking_type_id" as "picking_type_id" 
            FROM "stock_picking" LEFT JOIN "stock_picking_type" as "stock_picking__picking_type_id" ON ("stock_picking"."picking_type_id" = "stock_picking__picking_type_id"."id")
            WHERE (((("stock_picking"."scheduled_date" < $1)  AND  ("stock_picking"."state" in ($2,$3,$4)))  AND  (("stock_picking"."state" not in ($5,$6)) OR "stock_picking"."state" IS NULL))  AND  ("stock_picking"."picking_type_id" in ($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))) AND ("stock_picking"."company_id" IS NULL   OR  ("stock_picking"."company_id" in ($42)))
            GROUP BY "stock_picking"."picking_type_id","stock_picking__picking_type_id"."sequence","stock_picking__picking_type_id"."id"
            ORDER BY  "stock_picking__picking_type_id"."sequence" ,"stock_picking__picking_type_id"."id"
55 min < 0.1% 23 ms 145,145 odoo
SELECT "order_dispatch".id FROM "order_dispatch" WHERE ("order_dispatch"."state" = $1) ORDER BY "order_dispatch"."create_date" DESC  limit $2
Details
CREATE INDEX CONCURRENTLY ON order_dispatch (state, create_date)
Rows: 34502
Row progression: 34502, 11500, 0

Row estimates
- state (=): 11500
- create_date (sort): 1

Existing indexes
- id PRIMARY
55 min < 0.1% 12,864 ms 255 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE ("stock_move"."sale_line_id" in ($1,$2,$3,$4,$5,$6)) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
51 min < 0.1% 0 ms 24,476,932 odoo
SELECT "res_company".id FROM "res_company" WHERE ("res_company"."parent_id" in ($1)) ORDER BY "res_company"."sequence" ,"res_company"."name"
47 min < 0.1% 155 ms 18,159 odoo
SELECT "product_template".id FROM "product_template" LEFT JOIN 
                (SELECT DISTINCT ON (res_id) res_id, value
                 FROM "ir_translation"
                 WHERE name=$1 AND lang=$2 AND value!=$3
                 ORDER BY res_id, id DESC)
             as "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id") WHERE ((("product_template"."active" = $4)  AND  ("product_template"."type" in ($5,$6)))  AND  (("product_template"."id" in (WITH temp_irt_current (id, name) as (
                            SELECT ct.id, coalesce(it.value,ct."name")
                            FROM product_template ct
                            LEFT JOIN ir_translation it ON (it.name = $7 and
                                        it.lang = $8 and
                                        it.type = $9 and
                                        it.res_id = ct.id and
                                        it.value != $10)
                            )
                            SELECT id FROM temp_irt_current WHERE name ilike $11 order by name
                            ))  OR  $12)) ORDER BY COALESCE("product_template__name"."value", "product_template"."name")   limit $13
46 min < 0.1% 791 ms 3,483 odoo
SELECT min("stock_picking".id) AS id, count("stock_picking".id) AS "picking_type_id_count" , "stock_picking"."picking_type_id" as "picking_type_id" 
            FROM "stock_picking" LEFT JOIN "stock_picking_type" as "stock_picking__picking_type_id" ON ("stock_picking"."picking_type_id" = "stock_picking__picking_type_id"."id")
            WHERE ((("stock_picking"."state" in ($1,$2,$3))  AND  (("stock_picking"."state" not in ($4,$5)) OR "stock_picking"."state" IS NULL))  AND  ("stock_picking"."picking_type_id" in ($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))) AND ("stock_picking"."company_id" IS NULL   OR  ("stock_picking"."company_id" in ($41)))
            GROUP BY "stock_picking"."picking_type_id","stock_picking__picking_type_id"."sequence","stock_picking__picking_type_id"."id"
            ORDER BY  "stock_picking__picking_type_id"."sequence" ,"stock_picking__picking_type_id"."id"
45 min < 0.1% 2 ms 1,682,371 odoo
SELECT "stock_location".id FROM "stock_location" WHERE ("stock_location"."parent_right" >= $1) ORDER BY "stock_location"."parent_left"
Covered by index on (parent_right)
Rows: 523
Row progression: 523, 52

Row estimates
- parent_right (>=): 52
- parent_left (sort): 1

Existing indexes
- id PRIMARY
- barcode, company_id UNIQUE
- company_id
- location_id
- parent_left
- parent_right
- usage
43 min < 0.1% 747 ms 3,483 odoo
SELECT min("stock_picking".id) AS id, count("stock_picking".id) AS "picking_type_id_count" , "stock_picking"."picking_type_id" as "picking_type_id" 
            FROM "stock_picking" LEFT JOIN "stock_picking_type" as "stock_picking__picking_type_id" ON ("stock_picking"."picking_type_id" = "stock_picking__picking_type_id"."id")
            WHERE ((("stock_picking"."state" in ($1,$2))  AND  (("stock_picking"."state" not in ($3,$4)) OR "stock_picking"."state" IS NULL))  AND  ("stock_picking"."picking_type_id" in ($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))) AND ("stock_picking"."company_id" IS NULL   OR  ("stock_picking"."company_id" in ($40)))
            GROUP BY "stock_picking"."picking_type_id","stock_picking__picking_type_id"."sequence","stock_picking__picking_type_id"."id"
            ORDER BY  "stock_picking__picking_type_id"."sequence" ,"stock_picking__picking_type_id"."id"
43 min < 0.1% 0 ms 21,120,057 odoo
SELECT "product_category".id FROM "product_category" WHERE (("product_category"."id" = $1)  AND  (("product_category"."parent_left" < $2)  AND  ("product_category"."parent_left" >= $3))) ORDER BY "product_category"."parent_left"
43 min < 0.1% 34 ms 74,519 odoo
SELECT "material_requisition_line".id FROM "material_requisition_line" LEFT JOIN "res_partner" as "material_requisition_line__partner_id" ON ("material_requisition_line"."partner_id" = "material_requisition_line__partner_id"."id") LEFT JOIN "product_category" as "material_requisition_line__categ_id" ON ("material_requisition_line"."categ_id" = "material_requisition_line__categ_id"."id") LEFT JOIN "product_product" as "material_requisition_line__product_id" ON ("material_requisition_line"."product_id" = "material_requisition_line__product_id"."id") WHERE ("material_requisition_line"."requisition_id" = $1) ORDER BY "material_requisition_line__partner_id"."display_name" ,"material_requisition_line__categ_id"."parent_left" ,"material_requisition_line__product_id"."default_code" ,"material_requisition_line__product_id"."id"
42 min < 0.1% 12 ms 218,252 odoo
INSERT INTO "mail_message" ("id", "subtype_id", "message_type", "res_id", "parent_id", "model", "message_id", "email_from", "date", "subject", "record_name", "no_auto_thread", "body", "author_id", "reply_to", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval($1), $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, (now() at time zone $18), (now() at time zone $19)) RETURNING id
42 min < 0.1% 46 ms 54,829 odoo
SELECT "mrp_bom_line".id FROM "mrp_bom_line" WHERE ("mrp_bom_line"."product_id" in ($1)) ORDER BY "mrp_bom_line"."sequence" ,"mrp_bom_line"."id"
Details
CREATE INDEX CONCURRENTLY ON mrp_bom_line (product_id)
Rows: 47194
Row progression: 47194, 15

Row estimates
- product_id (=): 15
- sequence (sort): 1430
- id (sort): 1

Existing indexes
- id PRIMARY
- bom_id
42 min < 0.1% 96 ms 26,077 odoo
SELECT "product_product".id FROM "product_product" WHERE (("product_product"."active" = $1)  AND  ("product_product"."barcode"::text ilike $2)) ORDER BY "product_product"."default_code" ,"product_product"."id"
41 min < 0.1% 163 ms 14,967 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_id"="stock_move__location_id"."id" AND "stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_id" in ($4)))  AND  (((((((((((("stock_move__location_id"."parent_left" >= $5)  AND  ("stock_move__location_id"."parent_left" < $6))  OR  (("stock_move__location_id"."parent_left" >= $7)  AND  ("stock_move__location_id"."parent_left" < $8)))  OR  (("stock_move__location_id"."parent_left" >= $9)  AND  ("stock_move__location_id"."parent_left" < $10)))  OR  (("stock_move__location_id"."parent_left" >= $11)  AND  ("stock_move__location_id"."parent_left" < $12)))  OR  (("stock_move__location_id"."parent_left" >= $13)  AND  ("stock_move__location_id"."parent_left" < $14)))  OR  (("stock_move__location_id"."parent_left" >= $15)  AND  ("stock_move__location_id"."parent_left" < $16)))  OR  (("stock_move__location_id"."parent_left" >= $17)  AND  ("stock_move__location_id"."parent_left" < $18)))  OR  (("stock_move__location_id"."parent_left" >= $19)  AND  ("stock_move__location_id"."parent_left" < $20)))  OR  (("stock_move__location_id"."parent_left" >= $21)  AND  ("stock_move__location_id"."parent_left" < $22)))  OR  (("stock_move__location_id"."parent_left" >= $23)  AND  ("stock_move__location_id"."parent_left" < $24)))  OR  (("stock_move__location_id"."parent_left" >= $25)  AND  ("stock_move__location_id"."parent_left" < $26))))  AND  (((((((((((("stock_move__location_dest_id"."parent_left" < $27)  OR  ("stock_move__location_dest_id"."parent_left" >= $28))  AND  (("stock_move__location_dest_id"."parent_left" < $29)  OR  ("stock_move__location_dest_id"."parent_left" >= $30)))  AND  (("stock_move__location_dest_id"."parent_left" < $31)  OR  ("stock_move__location_dest_id"."parent_left" >= $32)))  AND  (("stock_move__location_dest_id"."parent_left" < $33)  OR  ("stock_move__location_dest_id"."parent_left" >= $34)))  AND  (("stock_move__location_dest_id"."parent_left" < $35)  OR  ("stock_move__location_dest_id"."parent_left" >= $36)))  AND  (("stock_move__location_dest_id"."parent_left" < $37)  OR  ("stock_move__location_dest_id"."parent_left" >= $38)))  AND  (("stock_move__location_dest_id"."parent_left" < $39)  OR  ("stock_move__location_dest_id"."parent_left" >= $40)))  AND  (("stock_move__location_dest_id"."parent_left" < $41)  OR  ("stock_move__location_dest_id"."parent_left" >= $42)))  AND  (("stock_move__location_dest_id"."parent_left" < $43)  OR  ("stock_move__location_dest_id"."parent_left" >= $44)))  AND  (("stock_move__location_dest_id"."parent_left" < $45)  OR  ("stock_move__location_dest_id"."parent_left" >= $46)))  AND  (("stock_move__location_dest_id"."parent_left" < $47)  OR  ("stock_move__location_dest_id"."parent_left" >= $48)))) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($49)))  OR  "stock_move__location_dest_id"."company_id" IS NULL )
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
39 min < 0.1% 8 ms 305,073 odoo
SELECT "kitchen_ticket".id FROM "kitchen_ticket" WHERE ("kitchen_ticket"."transfer_id" in ($1)) ORDER BY "kitchen_ticket"."id"
Details
CREATE INDEX CONCURRENTLY ON kitchen_ticket (transfer_id)
Rows: 6006
Row progression: 6006, 1

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

Existing indexes
- id PRIMARY
- name
- order_id
- state
38 min < 0.1% 12 ms 194,139 odoo
INSERT INTO "mail_message" ("id", "body", "model", "no_auto_thread", "record_name", "message_id", "email_from", "parent_id", "message_type", "author_id", "subtype_id", "res_id", "date", "subject", "reply_to", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval($1), $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, (now() at time zone $18), (now() at time zone $19)) RETURNING id
37 min < 0.1% 205 ms 10,921 odoo
SELECT "delivery_dashboard_entry".id FROM "delivery_dashboard_entry" WHERE ("delivery_dashboard_entry"."product_id" in ($1)) ORDER BY "delivery_dashboard_entry"."id"
Details
CREATE INDEX CONCURRENTLY ON delivery_dashboard_entry (product_id, id)
Rows: 172516
Row progression: 172516, 183, 0

Row estimates
- product_id (=): 183
- id (sort): 1

Existing indexes
- id PRIMARY
- do_line_id
36 min < 0.1% 7 ms 300,987 odoo
UPDATE "product_template" SET "name"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 12691
Row progression: 12691, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- company_id
- name
36 min < 0.1% 10,757 ms 201 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id") WHERE ("stock_move"."sale_line_id" in (13792978,13792979,13792980,13792981,13792982)) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
35 min < 0.1% 55 ms 37,748 odoo
SELECT "mrp_product_produce_line".id FROM "mrp_product_produce_line" WHERE ("mrp_product_produce_line"."product_produce_id" in ($1)) ORDER BY "mrp_product_produce_line"."id"
Details
CREATE INDEX CONCURRENTLY ON mrp_product_produce_line (product_produce_id)
Rows: 164365
Row progression: 164365, 8

Row estimates
- product_produce_id (=): 8
- id (sort): 1

Existing indexes
- id PRIMARY
34 min < 0.1% 1 ms 1,614,338 odoo
SELECT "queue_job".id FROM "queue_job" WHERE ("queue_job"."uuid" = $1) ORDER BY "queue_job"."date_created" DESC,"queue_job"."date_done" DESC  limit $2
Covered by index on (uuid)
Rows: 502652
Row progression: 502652, 1

Row estimates
- uuid (=): 1
- date_created (sort): 2

Existing indexes
- id PRIMARY
- channel
- company_id
- identity_key WHERE ((state)::text = ANY (ARRAY[('pending'::character varying)::text, ('enqueued'::character varying)::text])) AND (identity_key IS NOT NULL)
- name, date_created
- state
- uuid
34 min < 0.1% 100 ms 20,315 odoo
SELECT "product_product".id FROM "product_product" WHERE ("product_product"."active" = $1) ORDER BY "product_product"."default_code" ,"product_product"."id"   limit $2
Covered by index on (active, default_code)
Rows: 1000206
Row progression: 1000206, 500103, 0

Row estimates
- active (=): 500103
- default_code (sort): 0
- id (sort): 1

Existing indexes
- id PRIMARY
- active, default_code
- barcode UNIQUE
- default_code
- product_tmpl_id
33 min < 0.1% 130 ms 14,967 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_dest_id","stock_location" as "stock_move__location_id","stock_move"
            WHERE ("stock_move"."location_id"="stock_move__location_id"."id" AND "stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_id" in ($4)))  AND  (((((("stock_move__location_dest_id"."parent_left" >= $5)  AND  ("stock_move__location_dest_id"."parent_left" < $6))  OR  (("stock_move__location_dest_id"."parent_left" >= $7)  AND  ("stock_move__location_dest_id"."parent_left" < $8)))  OR  (("stock_move__location_dest_id"."parent_left" >= $9)  AND  ("stock_move__location_dest_id"."parent_left" < $10)))  OR  (("stock_move__location_dest_id"."parent_left" >= $11)  AND  ("stock_move__location_dest_id"."parent_left" < $12)))  OR  ("stock_move"."location_dest_id" in ($13))))  AND  (((((("stock_move__location_id"."parent_left" < $14)  OR  ("stock_move__location_id"."parent_left" >= $15))  AND  (("stock_move__location_id"."parent_left" < $16)  OR  ("stock_move__location_id"."parent_left" >= $17)))  AND  (("stock_move__location_id"."parent_left" < $18)  OR  ("stock_move__location_id"."parent_left" >= $19)))  AND  (("stock_move__location_id"."parent_left" < $20)  OR  ("stock_move__location_id"."parent_left" >= $21)))  AND  (NOT (("stock_move"."location_id" in ($22)))))) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($23)))  OR  "stock_move__location_dest_id"."company_id" IS NULL )
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
32 min < 0.1% 0 ms 8,989,994 odoo
SELECT base_registry_signaling.last_value,
                                  base_cache_signaling.last_value
                           FROM base_registry_signaling, base_cache_signaling
32 min < 0.1% 17 ms 109,462 odoo
UPDATE "material_requisition_line" SET "dispatch_qty"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 32303
Row progression: 32303, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
30 min < 0.1% 6,749 ms 268 odoo
UPDATE "stock_quant" SET "reserved_quantity"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 2772386
Row progression: 2772386, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- lot_id
- product_id
29 min < 0.1% 118 ms 14,893 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_id"="stock_move__location_id"."id" AND "stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_id" in ($4)))  AND  ((((((((((((("stock_move__location_id"."parent_left" >= $5)  AND  ("stock_move__location_id"."parent_left" < $6))  OR  (("stock_move__location_id"."parent_left" >= $7)  AND  ("stock_move__location_id"."parent_left" < $8)))  OR  (("stock_move__location_id"."parent_left" >= $9)  AND  ("stock_move__location_id"."parent_left" < $10)))  OR  (("stock_move__location_id"."parent_left" >= $11)  AND  ("stock_move__location_id"."parent_left" < $12)))  OR  (("stock_move__location_id"."parent_left" >= $13)  AND  ("stock_move__location_id"."parent_left" < $14)))  OR  (("stock_move__location_id"."parent_left" >= $15)  AND  ("stock_move__location_id"."parent_left" < $16)))  OR  (("stock_move__location_id"."parent_left" >= $17)  AND  ("stock_move__location_id"."parent_left" < $18)))  OR  (("stock_move__location_id"."parent_left" >= $19)  AND  ("stock_move__location_id"."parent_left" < $20)))  OR  (("stock_move__location_id"."parent_left" >= $21)  AND  ("stock_move__location_id"."parent_left" < $22)))  OR  (("stock_move__location_id"."parent_left" >= $23)  AND  ("stock_move__location_id"."parent_left" < $24)))  OR  (("stock_move__location_id"."parent_left" >= $25)  AND  ("stock_move__location_id"."parent_left" < $26)))  OR  (("stock_move__location_id"."parent_left" >= $27)  AND  ("stock_move__location_id"."parent_left" < $28))))  AND  ((((((((((((("stock_move__location_dest_id"."parent_left" < $29)  OR  ("stock_move__location_dest_id"."parent_left" >= $30))  AND  (("stock_move__location_dest_id"."parent_left" < $31)  OR  ("stock_move__location_dest_id"."parent_left" >= $32)))  AND  (("stock_move__location_dest_id"."parent_left" < $33)  OR  ("stock_move__location_dest_id"."parent_left" >= $34)))  AND  (("stock_move__location_dest_id"."parent_left" < $35)  OR  ("stock_move__location_dest_id"."parent_left" >= $36)))  AND  (("stock_move__location_dest_id"."parent_left" < $37)  OR  ("stock_move__location_dest_id"."parent_left" >= $38)))  AND  (("stock_move__location_dest_id"."parent_left" < $39)  OR  ("stock_move__location_dest_id"."parent_left" >= $40)))  AND  (("stock_move__location_dest_id"."parent_left" < $41)  OR  ("stock_move__location_dest_id"."parent_left" >= $42)))  AND  (("stock_move__location_dest_id"."parent_left" < $43)  OR  ("stock_move__location_dest_id"."parent_left" >= $44)))  AND  (("stock_move__location_dest_id"."parent_left" < $45)  OR  ("stock_move__location_dest_id"."parent_left" >= $46)))  AND  (("stock_move__location_dest_id"."parent_left" < $47)  OR  ("stock_move__location_dest_id"."parent_left" >= $48)))  AND  (("stock_move__location_dest_id"."parent_left" < $49)  OR  ("stock_move__location_dest_id"."parent_left" >= $50)))  AND  (("stock_move__location_dest_id"."parent_left" < $51)  OR  ("stock_move__location_dest_id"."parent_left" >= $52)))) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($53)))  OR  "stock_move__location_dest_id"."company_id" IS NULL )
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
28 min < 0.1% 112 ms 14,967 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_id","stock_location" as "stock_move__location_dest_id","stock_move"
            WHERE ("stock_move"."location_id"="stock_move__location_id"."id" AND "stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_id" in ($4)))  AND  (((((("stock_move__location_id"."parent_left" >= $5)  AND  ("stock_move__location_id"."parent_left" < $6))  OR  (("stock_move__location_id"."parent_left" >= $7)  AND  ("stock_move__location_id"."parent_left" < $8)))  OR  (("stock_move__location_id"."parent_left" >= $9)  AND  ("stock_move__location_id"."parent_left" < $10)))  OR  (("stock_move__location_id"."parent_left" >= $11)  AND  ("stock_move__location_id"."parent_left" < $12)))  OR  ("stock_move"."location_id" in ($13))))  AND  (((((("stock_move__location_dest_id"."parent_left" < $14)  OR  ("stock_move__location_dest_id"."parent_left" >= $15))  AND  (("stock_move__location_dest_id"."parent_left" < $16)  OR  ("stock_move__location_dest_id"."parent_left" >= $17)))  AND  (("stock_move__location_dest_id"."parent_left" < $18)  OR  ("stock_move__location_dest_id"."parent_left" >= $19)))  AND  (("stock_move__location_dest_id"."parent_left" < $20)  OR  ("stock_move__location_dest_id"."parent_left" >= $21)))  AND  (NOT (("stock_move"."location_dest_id" in ($22)))))) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($23)))  OR  "stock_move__location_dest_id"."company_id" IS NULL )
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
28 min < 0.1% 23,999 ms 69 odoo
SELECT "stock_move".id FROM "stock_move" LEFT JOIN "stock_picking" as "stock_move__picking_id" ON ("stock_move"."picking_id" = "stock_move__picking_id"."id"),"stock_location" as "stock_move__location_dest_id" WHERE (("stock_move"."state" not in ($1,$2)) OR "stock_move"."state" IS NULL) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($3)))  OR  "stock_move__location_dest_id"."company_id" IS NULL ) ORDER BY "stock_move__picking_id"."priority" DESC,"stock_move__picking_id"."date" ASC,"stock_move__picking_id"."id" DESC,"stock_move"."sequence" ,"stock_move"."id"
26 min < 0.1% 2 ms 779,149 odoo
UPDATE "stock_move" SET "is_done"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 18027422
Row progression: 18027422, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- company_id
- create_date
- created_production_id
- date
- date_expected
- location_id
- name
- origin_returned_move_id
- picking_id, id
- product_id, location_id, location_dest_id, company_id, state
- product_id, location_id, location_dest_id, state
- purchase_line_id
- scrapped
- state
25 min < 0.1% 44 ms 34,644 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_move" LEFT JOIN "product_product" as "stock_move__product_id" ON ("stock_move"."product_id" = "stock_move__product_id"."id"),"stock_location" as "stock_move__location_dest_id"
            WHERE (((("stock_move"."location_dest_id" = $1)  AND  ("stock_move"."state" = $2))  AND  ("stock_move"."product_id" in ($3)))  AND  ("stock_move"."date" >= $4)) AND ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id") AND (("stock_move"."company_id" IS NULL   OR  ("stock_move"."company_id" in ($5)))  OR  "stock_move__location_dest_id"."company_id" IS NULL )
            GROUP BY "stock_move"."product_id","stock_move__product_id"."default_code","stock_move__product_id"."id"
            ORDER BY  "stock_move__product_id"."default_code" ,"stock_move__product_id"."id"
25 min < 0.1% 2 ms 863,563 odoo
SELECT "swk_delivery_rule".id FROM "swk_delivery_rule" WHERE ("swk_delivery_rule"."product_id" in ($1)) ORDER BY "swk_delivery_rule"."id"
Details
CREATE INDEX CONCURRENTLY ON swk_delivery_rule (product_id)
Rows: 1457
Row progression: 1457, 8

Row estimates
- product_id (=): 8
- id (sort): 1

Existing indexes
- id PRIMARY
- dayofweek
24 min < 0.1% 31 ms 47,486 odoo
SELECT min("mrp_production".id) AS id, count("mrp_production".id) AS "product_id_count" , "mrp_production"."product_id" as "product_id" 
            FROM "mrp_production" LEFT JOIN "product_product" as "mrp_production__product_id" ON ("mrp_production"."product_id" = "mrp_production__product_id"."id")
            WHERE ("mrp_production"."product_id" in ($1)) AND (("mrp_production"."company_id" in ($2))  OR  "mrp_production"."company_id" IS NULL )
            GROUP BY "mrp_production"."product_id","mrp_production__product_id"."default_code","mrp_production__product_id"."id"
            ORDER BY  "mrp_production__product_id"."default_code" ,"mrp_production__product_id"."id"
24 min < 0.1% 1 ms 1,521,489 odoo
SELECT "stock_inventory_line".id FROM "stock_inventory_line" WHERE ("stock_inventory_line"."product_id" in ($1)) ORDER BY "stock_inventory_line"."id"
Covered by index on (product_id)
Rows: 96034
Row progression: 96034, 45

Row estimates
- product_id (=): 45
- id (sort): 1

Existing indexes
- id PRIMARY
- company_id
- inventory_id
- location_id
- package_id
- product_id
23 min < 0.1% 2 ms 750,502 odoo
UPDATE "queue_job" SET "retry"=$1,"date_started"=$2,"state"=$3,"date_enqueued"=$4,"max_retries"=$5,"identity_key"=$6,"company_id"=$7,"exc_info"=$8,"eta"=$9,"result"=$10,"date_done"=$11,"priority"=$12,"user_id"=$13 WHERE id IN ($14)
Covered by index on (id)
Rows: 502652
Row progression: 502652, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- channel
- company_id
- identity_key WHERE ((state)::text = ANY (ARRAY[('pending'::character varying)::text, ('enqueued'::character varying)::text])) AND (identity_key IS NOT NULL)
- name, date_created
- state
- uuid
22 min < 0.1% 1 ms 1,262,927 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)
20 min < 0.1% 2 ms 540,981 odoo
UPDATE "stock_move_line" SET "move_line_processed"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 16143568
Row progression: 16143568, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- move_id
- picking_id
20 min < 0.1% 17 ms 68,543 odoo
SELECT "ir_model_fields".id FROM "ir_model_fields" WHERE ("ir_model_fields"."ttype" = $1) ORDER BY "ir_model_fields"."name"
Details
CREATE INDEX CONCURRENTLY ON ir_model_fields (ttype, name)
Rows: 8940
Row progression: 8940, 526, 0

Row estimates
- ttype (=): 526
- name (sort): 4

Existing indexes
- id PRIMARY
- complete_name
- model, name UNIQUE
- model_id
- name
- state
20 min < 0.1% 16 ms 73,214 odoo
SELECT "stock_production_lot".id FROM "stock_production_lot" WHERE ("stock_production_lot"."product_id" in ($1)) ORDER BY "stock_production_lot"."id"
Covered by index on (product_id, id)
Rows: 936270
Row progression: 936270, 474, 0

Row estimates
- product_id (=): 474
- id (sort): 1

Existing indexes
- id PRIMARY
- name, product_id UNIQUE
- product_id, id
20 min < 0.1% 7 ms 161,524 odoo
SELECT "mrp_bom".id FROM "mrp_bom" WHERE ("mrp_bom"."product_id" IS NULL   AND  ("mrp_bom"."product_tmpl_id" = $1)) ORDER BY "mrp_bom"."sequence"   limit $2
Details
CREATE INDEX CONCURRENTLY ON mrp_bom (product_tmpl_id)
Rows: 8402
Row progression: 8402, 1

Row estimates
- product_tmpl_id (=): 1
- product_id (null): 8385
- sequence (sort): 8402

Existing indexes
- id PRIMARY
18 min < 0.1% 151 ms 7,237 odoo
SELECT "product_template".id FROM "product_template" LEFT JOIN 
                (SELECT DISTINCT ON (res_id) res_id, value
                 FROM "ir_translation"
                 WHERE name=$1 AND lang=$2 AND value!=$3
                 ORDER BY res_id, id DESC)
             as "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id") WHERE (("product_template"."active" = $4)  AND  (("product_template"."id" in (WITH temp_irt_current (id, name) as (
                            SELECT ct.id, coalesce(it.value,ct."name")
                            FROM product_template ct
                            LEFT JOIN ir_translation it ON (it.name = $5 and
                                        it.lang = $6 and
                                        it.type = $7 and
                                        it.res_id = ct.id and
                                        it.value != $8)
                            )
                            SELECT id FROM temp_irt_current WHERE name ilike $9 order by name
                            ))  OR  $10)) ORDER BY COALESCE("product_template__name"."value", "product_template"."name")   limit $11
18 min < 0.1% 7 ms 145,684 odoo
SELECT "delivery_order".id FROM "delivery_order" LEFT JOIN "stock_warehouse" as "delivery_order__kitchen_id" ON ("delivery_order"."kitchen_id" = "delivery_order__kitchen_id"."id") WHERE ("delivery_order"."transfer_id" in ($1)) ORDER BY "delivery_order__kitchen_id"."name"
18 min < 0.1% 2 ms 555,143 odoo
UPDATE "mrp_production" SET "availability"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 2150555
Row progression: 2150555, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- date_finished
- date_planned_finished
- date_planned_start
- date_start
- name, company_id UNIQUE
- product_id, date_planned_start
18 min < 0.1% 2,262 ms 468 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_dest_id","stock_location" as "stock_move__location_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  ((((((((((((("stock_move__location_dest_id"."parent_left" >= $629)  AND  ("stock_move__location_dest_id"."parent_left" < $630))  OR  (("stock_move__location_dest_id"."parent_left" >= $631)  AND  ("stock_move__location_dest_id"."parent_left" < $632)))  OR  (("stock_move__location_dest_id"."parent_left" >= $633)  AND  ("stock_move__location_dest_id"."parent_left" < $634)))  OR  (("stock_move__location_dest_id"."parent_left" >= $635)  AND  ("stock_move__location_dest_id"."parent_left" < $636)))  OR  (("stock_move__location_dest_id"."parent_left" >= $637)  AND  ("stock_move__location_dest_id"."parent_left" < $638)))  OR  (("stock_move__location_dest_id"."parent_left" >= $639)  AND  ("stock_move__location_dest_id"."parent_left" < $640)))  OR  (("stock_move__location_dest_id"."parent_left" >= $641)  AND  ("stock_move__location_dest_id"."parent_left" < $642)))  OR  (("stock_move__location_dest_id"."parent_left" >= $643)  AND  ("stock_move__location_dest_id"."parent_left" < $644)))  OR  (("stock_move__location_dest_id"."parent_left" >= $645)  AND  ("stock_move__location_dest_id"."parent_left" < $646)))  OR  (("stock_move__location_dest_id"."parent_left" >= $647)  AND  ("stock_move__location_dest_id"."parent_left" < $648)))  OR  (("stock_move__location_dest_id"."parent_left" >= $649)  AND  ("stock_move__location_dest_id"."parent_left" < $650)))  OR  (("stock_move__location_dest_id"."parent_left" >= $651)  AND  ("stock_move__location_dest_id"."parent_left" < $652))))  AND  ((((((((((((("stock_move__location_id"."parent_left" < $653)  OR  ("stock_move__location_id"."parent_left" >= $654))  AND  (("stock_move__location_id"."parent_left" < $655)  OR  ("stock_move__location_id"."parent_left" >= $656)))  AND  (("stock_move__location_id"."parent_left" < $657)  OR  ("stock_move__location_id"."parent_left" >= $658)))  AND  (("stock_move__location_id"."parent_left" < $659)  OR  ("stock_move__location_id"."parent_left" >= $660)))  AND  (("stock_move__location_id"."parent_left" < $661)  OR  ("stock_move__location_id"."parent_left" >= $662)))  AND  (("stock_move__location_id"."parent_left" < $663)  OR  ("stock_move__location_id"."parent_left" >= $664)))  AND  (("stock_move__location_id"."parent_left" < $665)  OR  ("stock_move__location_id"."parent_left" >= $666)))  AND  (("stock_move__location_id"."parent_left" < $667)  OR  ("stock_move__location_id"."parent_left" >= $668)))  AND  (("stock_move__location_id"."parent_left" < $669)  OR  ("stock_move__location_id"."parent_left" >= $670)))  AND  (("stock_move__location_id"."parent_left" < $671)  OR  ("stock_move__location_id"."parent_left" >= $672)))  AND  (("stock_move__location_id"."parent_left" < $673)  OR  ("stock_move__location_id"."parent_left" >= $674)))  AND  (("stock_move__location_id"."parent_left" < $675)  OR  ("stock_move__location_id"."parent_left" >= $676))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
17 min < 0.1% 2,368 ms 439 odoo
SELECT min("stock_move".id) AS id, count("stock_move".id) AS "product_id_count" , sum("stock_move"."product_qty") AS "product_qty" ,"stock_move"."product_id" as "product_id" 
            FROM "stock_location" as "stock_move__location_dest_id","stock_location" as "stock_move__location_id","stock_move"
            WHERE ("stock_move"."location_dest_id"="stock_move__location_dest_id"."id" AND "stock_move"."location_id"="stock_move__location_id"."id") AND ((((("stock_move"."state" not in ($1,$2,$3)) OR "stock_move"."state" IS NULL)  AND  ("stock_move"."product_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,$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)))  AND  ((((((((((((("stock_move__location_dest_id"."parent_left" >= $623)  AND  ("stock_move__location_dest_id"."parent_left" < $624))  OR  (("stock_move__location_dest_id"."parent_left" >= $625)  AND  ("stock_move__location_dest_id"."parent_left" < $626)))  OR  (("stock_move__location_dest_id"."parent_left" >= $627)  AND  ("stock_move__location_dest_id"."parent_left" < $628)))  OR  (("stock_move__location_dest_id"."parent_left" >= $629)  AND  ("stock_move__location_dest_id"."parent_left" < $630)))  OR  (("stock_move__location_dest_id"."parent_left" >= $631)  AND  ("stock_move__location_dest_id"."parent_left" < $632)))  OR  (("stock_move__location_dest_id"."parent_left" >= $633)  AND  ("stock_move__location_dest_id"."parent_left" < $634)))  OR  (("stock_move__location_dest_id"."parent_left" >= $635)  AND  ("stock_move__location_dest_id"."parent_left" < $636)))  OR  (("stock_move__location_dest_id"."parent_left" >= $637)  AND  ("stock_move__location_dest_id"."parent_left" < $638)))  OR  (("stock_move__location_dest_id"."parent_left" >= $639)  AND  ("stock_move__location_dest_id"."parent_left" < $640)))  OR  (("stock_move__location_dest_id"."parent_left" >= $641)  AND  ("stock_move__location_dest_id"."parent_left" < $642)))  OR  (("stock_move__location_dest_id"."parent_left" >= $643)  AND  ("stock_move__location_dest_id"."parent_left" < $644)))  OR  (("stock_move__location_dest_id"."parent_left" >= $645)  AND  ("stock_move__location_dest_id"."parent_left" < $646))))  AND  ((((((((((((("stock_move__location_id"."parent_left" < $647)  OR  ("stock_move__location_id"."parent_left" >= $648))  AND  (("stock_move__location_id"."parent_left" < $649)  OR  ("stock_move__location_id"."parent_left" >= $650)))  AND  (("stock_move__location_id"."parent_left" < $651)  OR  ("stock_move__location_id"."parent_left" >= $652)))  AND  (("stock_move__location_id"."parent_left" < $653)  OR  ("stock_move__location_id"."parent_left" >= $654)))  AND  (("stock_move__location_id"."parent_left" < $655)  OR  ("stock_move__location_id"."parent_left" >= $656)))  AND  (("stock_move__location_id"."parent_left" < $657)  OR  ("stock_move__location_id"."parent_left" >= $658)))  AND  (("stock_move__location_id"."parent_left" < $659)  OR  ("stock_move__location_id"."parent_left" >= $660)))  AND  (("stock_move__location_id"."parent_left" < $661)  OR  ("stock_move__location_id"."parent_left" >= $662)))  AND  (("stock_move__location_id"."parent_left" < $663)  OR  ("stock_move__location_id"."parent_left" >= $664)))  AND  (("stock_move__location_id"."parent_left" < $665)  OR  ("stock_move__location_id"."parent_left" >= $666)))  AND  (("stock_move__location_id"."parent_left" < $667)  OR  ("stock_move__location_id"."parent_left" >= $668)))  AND  (("stock_move__location_id"."parent_left" < $669)  OR  ("stock_move__location_id"."parent_left" >= $670))))
            GROUP BY "stock_move"."product_id"
            ORDER BY "id"
17 min < 0.1% 2 ms 611,141 odoo
UPDATE "stock_move" SET "reference"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 18027422
Row progression: 18027422, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- company_id
- create_date
- created_production_id
- date
- date_expected
- location_id
- name
- origin_returned_move_id
- picking_id, id
- product_id, location_id, location_dest_id, company_id, state
- product_id, location_id, location_dest_id, state
- purchase_line_id
- scrapped
- state
17 min < 0.1% 2 ms 611,143 odoo
UPDATE "stock_move" SET "picking_currency_id"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 18027422
Row progression: 18027422, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- company_id
- create_date
- created_production_id
- date
- date_expected
- location_id
- name
- origin_returned_move_id
- picking_id, id
- product_id, location_id, location_dest_id, company_id, state
- product_id, location_id, location_dest_id, state
- purchase_line_id
- scrapped
- state
17 min < 0.1% 1 ms 1,749,511 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
16 min < 0.1% 3 ms 369,778 odoo
UPDATE "queue_job" SET "state"=$1 WHERE id IN ($2)
Covered by index on (id)
Rows: 502652
Row progression: 502652, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- channel
- company_id
- identity_key WHERE ((state)::text = ANY (ARRAY[('pending'::character varying)::text, ('enqueued'::character varying)::text])) AND (identity_key IS NOT NULL)
- name, date_created
- state
- uuid
16 min < 0.1% 0 ms 20,922,212 odoo
BEGIN ISOLATION LEVEL REPEATABLE READ
16 min < 0.1% 2 ms 569,077 odoo
UPDATE "stock_move" SET "product_qty"=$1,"write_uid"=$2,"write_date"=(now() at time zone $3) WHERE id IN ($4)
Covered by index on (id)
Rows: 18027422
Row progression: 18027422, 1

Row estimates
- id (=): 1

Existing indexes
- id PRIMARY
- company_id
- create_date
- created_production_id
- date
- date_expected
- location_id
- name
- origin_returned_move_id
- picking_id, id
- product_id, location_id, location_dest_id, company_id, state
- product_id, location_id, location_dest_id, state
- purchase_line_id
- scrapped
- state