|
223 min
6%
|
82 ms
|
162,853
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."so_state_id" = $1) AND ("asm_so"."so_type" = $2)) AND (((("asm_so"."service_center_id" in ($3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($101,$102))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
205 min
5%
|
481 ms
|
25,626
odoo14
|
SELECT res_partner.id
FROM "res_partner"
WHERE (("res_partner"."active" = $1) AND (("res_partner"."name"::text ilike $2) OR (("res_partner"."mobile"::text ilike $3) OR (("res_partner"."city"::text ilike $4) OR (("res_partner"."email"::text ilike $5) OR (("res_partner"."phone"::text ilike $6) OR (("res_partner"."mobile2"::text ilike $7) OR (("res_partner"."ref"::text ilike $8) OR ("res_partner"."function"::text ilike $9))))))))) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $10 ) OR ("res_partner"."company_id" in ($11))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $12) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $13))) AND (res_partner.email ilike $14
OR res_partner.display_name ilike $15
OR res_partner.ref ilike $16
OR res_partner.vat ilike $17)
-- don't panic, trust postgres bitmap
ORDER BY COALESCE(res_partner.customer_rank, $18) DESC, res_partner.display_name ilike $19 desc,
res_partner.display_name
limit $20
|
|
143 min
4%
|
242 ms
|
35,571
odoo14
|
SELECT res_partner.id
FROM "res_partner"
WHERE (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $1 ) OR ("res_partner"."company_id" in ($2))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $3) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $4))) AND (res_partner.email ilike $5
OR res_partner.display_name ilike $6
OR res_partner.ref ilike $7
OR res_partner.vat ilike $8)
-- don't panic, trust postgres bitmap
ORDER BY res_partner.display_name ilike $9 desc,
res_partner.display_name
|
|
141 min
4%
|
75 ms
|
113,305
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($7))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
136 min
4%
|
161 ms
|
50,844
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($7))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $8
|
|
114 min
3%
|
82 ms
|
83,914
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."sr_id" in ($1))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (sr_id)
Rows: 326820
Row progression: 326820, 4
Row estimates
- sr_id (=): 4
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
104 min
3%
|
67 ms
|
92,937
odoo14
|
SELECT count($1) FROM "asm_so" WHERE (((("asm_so"."client_id" = $2) AND ("asm_so"."product_id" = $3)) AND (("asm_so"."id" != $4) OR "asm_so"."id" IS NULL)) AND "asm_so"."product_serial_warranty_id" IS NOT NULL)
|
|
86 min
2%
|
267 ms
|
19,435
odoo14
|
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in (SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ($1,$2)))) AND ("mail_message"."author_id" = $3)) AND ("mail_message"."res_id" != $4)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != $5) OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC
|
|
82 min
2%
|
52 ms
|
94,261
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON asm_so (sr_id)
Rows: 179976
Row progression: 179976, 1
Row estimates
- sr_id (=): 1
- name (sort): 1
Existing indexes
- id PRIMARY
- message_main_attachment_id
- name
|
|
74 min
2%
|
72 ms
|
61,086
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($15,$16,$17,$18,$19)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($20))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
73 min
2%
|
374 ms
|
11,639
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE ((($1 OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."phone"::text ilike $2) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $3 ) OR ("res_partner"."company_id" in ($4))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $5) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $6))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."mobile"::text ilike $7) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $8 ) OR ("res_partner"."company_id" in ($9))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $10) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $11))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."mobile2"::text ilike $12) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $13 ) OR ("res_partner"."company_id" in ($14))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $15) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $16))) ORDER BY "res_partner"."id" ))) AND (((("asm_sr"."service_center_id" in ($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)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($101,$102,$103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($116,$117))) ORDER BY "asm_sr"."call_date" DESC LIMIT $118
|
|
67 min
2%
|
302 ms
|
13,325
odoo14
|
SELECT res_partner.id
FROM "res_partner"
WHERE ("res_partner"."active" = $1) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $2 ) OR ("res_partner"."company_id" in ($3))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $4) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $5))) AND (res_partner.email ilike $6
OR res_partner.display_name ilike $7
OR res_partner.ref ilike $8
OR res_partner.vat ilike $9)
-- don't panic, trust postgres bitmap
ORDER BY COALESCE(res_partner.customer_rank, $10) DESC, res_partner.display_name ilike $11 desc,
res_partner.display_name
limit $12
|
|
58 min
2%
|
99 ms
|
34,987
odoo14
|
SELECT "asm_products_used".id FROM "asm_products_used" WHERE ((("asm_products_used"."product_id" = $1) AND ("asm_products_used"."location_id" = $2)) AND ("asm_products_used"."is_moved" IS NULL or "asm_products_used"."is_moved" = $3 )) ORDER BY "asm_products_used"."id"
|
|
50 min
1%
|
205 ms
|
14,609
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."so_state_id" = $1) AND ("asm_so"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($2)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $3 ) OR ("res_partner"."company_id" in ($4))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $5) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $6))) ORDER BY "res_partner"."id" ))) AND (((("asm_so"."service_center_id" in ($7,$8,$9,$10,$11,$12,$13,$14)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($27,$28))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
43 min
1%
|
153 ms
|
16,866
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE ("asm_sr"."sr_state_id" = $1) AND (((("asm_sr"."service_center_id" in ($2)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($3,$4,$5,$6)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($7,$8))) ORDER BY "asm_sr"."name" DESC,"asm_sr"."id" DESC LIMIT $9
|
|
42 min
1%
|
1,021 ms
|
2,460
odoo14
|
SELECT min("asm_sr".id) AS id, count("asm_sr".id) AS "sr_state_id_count" , sum("asm_sr"."diff_last_activity_create") AS "diff_last_activity_create",sum("asm_sr"."so_count") AS "so_count","asm_sr"."sr_state_id" as "sr_state_id"
FROM "asm_sr" LEFT JOIN "asm_state" AS "asm_sr__sr_state_id" ON ("asm_sr"."sr_state_id" = "asm_sr__sr_state_id"."id") LEFT JOIN "ir_translation" AS "asm_sr__sr_state_id__name" ON ("asm_sr__sr_state_id"."id" = "asm_sr__sr_state_id__name"."res_id" AND "asm_sr__sr_state_id__name"."type" = $1 AND "asm_sr__sr_state_id__name"."name" = $2 AND "asm_sr__sr_state_id__name"."lang" = $3 AND "asm_sr__sr_state_id__name"."value" != $4)
WHERE (("asm_sr"."sr_type" = $5) AND (("asm_sr"."client_type" = $6) AND ((((((((((("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($7)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $8 ) OR ("res_partner"."company_id" in ($9))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $10) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $11))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($12)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $13 ) OR ("res_partner"."company_id" in ($14))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $15) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $16))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($17)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $18 ) OR ("res_partner"."company_id" in ($19))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $20) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $21))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($22)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $23 ) OR ("res_partner"."company_id" in ($24))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $25) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $26))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($27)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $28 ) OR ("res_partner"."company_id" in ($29))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $30) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $31))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($32)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $33 ) OR ("res_partner"."company_id" in ($34))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $35) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $36))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($37)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $38 ) OR ("res_partner"."company_id" in ($39))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $40) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $41))) ORDER BY "res_partner"."id" ))) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)))) AND (((("asm_sr"."service_center_id" in ($424,$425,$426,$427,$428,$429,$430,$431,$432,$433,$434,$435,$436)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($437,$438,$439,$440,$441)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($442,$443)))
GROUP BY "asm_sr"."sr_state_id","asm_sr__sr_state_id"."sequence",COALESCE("asm_sr__sr_state_id__name"."value","asm_sr__sr_state_id"."name"),"asm_sr__sr_state_id"."id"
ORDER BY "asm_sr__sr_state_id"."sequence" ,COALESCE("asm_sr__sr_state_id__name"."value", "asm_sr__sr_state_id"."name") ,"asm_sr__sr_state_id"."id"
|
|
41 min
1%
|
132 ms
|
18,623
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80)) AND (((("asm_so"."service_center_id" in ($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)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($165,$166,$167,$168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($180,$181))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
41 min
1%
|
78 ms
|
31,174
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($17))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
39 min
1%
|
88 ms
|
26,728
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
34 min
0.9%
|
94 ms
|
21,683
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
33 min
0.9%
|
79 ms
|
25,456
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($101,$102))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
31 min
0.8%
|
866 ms
|
2,181
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE (("asm_sr"."sr_state_id" = $1) AND (("asm_sr"."sr_type" = $2) AND (("asm_sr"."client_type" = $3) AND ((((((((((("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($4)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $5 ) OR ("res_partner"."company_id" in ($6))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $7) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $8))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($9)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $10 ) OR ("res_partner"."company_id" in ($11))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $12) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $13))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($14)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $15 ) OR ("res_partner"."company_id" in ($16))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $17) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $18))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($19)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $20 ) OR ("res_partner"."company_id" in ($21))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $22) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $23))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($24)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $25 ) OR ("res_partner"."company_id" in ($26))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $27) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $28))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($29)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $30 ) OR ("res_partner"."company_id" in ($31))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $32) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $33))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($34)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $35 ) OR ("res_partner"."company_id" in ($36))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $37) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $38))) ORDER BY "res_partner"."id" ))) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL))))) AND (((("asm_sr"."service_center_id" in ($421,$422,$423,$424,$425,$426,$427,$428,$429,$430,$431,$432,$433)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($434,$435,$436,$437,$438)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($439,$440))) ORDER BY "asm_sr"."client_type" ASC,"asm_sr"."call_date" DESC LIMIT $441
|
|
31 min
0.8%
|
378 ms
|
4,858
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE ((($1 OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."phone"::text ilike $2) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $3 ) OR ("res_partner"."company_id" in ($4))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $5) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $6))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."mobile"::text ilike $7) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $8 ) OR ("res_partner"."company_id" in ($9))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $10) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $11))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."mobile2"::text ilike $12) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $13 ) OR ("res_partner"."company_id" in ($14))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $15) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $16))) ORDER BY "res_partner"."id" ))) AND (((("asm_sr"."service_center_id" in ($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)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115,$116,$117)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($118,$119))) ORDER BY "asm_sr"."call_date" DESC LIMIT $120
|
|
30 min
0.8%
|
22 ms
|
83,426
odoo14
|
SELECT "asm_signature".id FROM "asm_signature" WHERE ("asm_signature"."sr_id" in ($1)) ORDER BY "asm_signature"."id"
Details
CREATE INDEX CONCURRENTLY ON asm_signature (sr_id)
Rows: 104467
Row progression: 104467, 1
Row estimates
- sr_id (=): 1
- id (sort): 1
Existing indexes
- id PRIMARY
- so_id
|
|
30 min
0.8%
|
919 ms
|
1,947
odoo14
|
SELECT min("asm_sr".id) AS id, count("asm_sr".id) AS "sr_type_count" , sum("asm_sr"."diff_last_activity_create") AS "diff_last_activity_create",sum("asm_sr"."so_count") AS "so_count","asm_sr"."sr_type" as "sr_type"
FROM "asm_sr"
WHERE (("asm_sr"."client_type" = $1) AND ((((((((((("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($2)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $3 ) OR ("res_partner"."company_id" in ($4))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $5) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $6))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($7)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $8 ) OR ("res_partner"."company_id" in ($9))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $10) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $11))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($12)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $13 ) OR ("res_partner"."company_id" in ($14))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $15) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $16))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($17)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $18 ) OR ("res_partner"."company_id" in ($19))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $20) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $21))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($22)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $23 ) OR ("res_partner"."company_id" in ($24))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $25) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $26))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($27)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $28 ) OR ("res_partner"."company_id" in ($29))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $30) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $31))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($32)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $33 ) OR ("res_partner"."company_id" in ($34))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $35) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $36))) ORDER BY "res_partner"."id" ))) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL))) AND (((("asm_sr"."service_center_id" in ($419,$420,$421,$422,$423,$424,$425,$426,$427,$428,$429,$430,$431)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($432,$433,$434,$435,$436)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($437,$438)))
GROUP BY "asm_sr"."sr_type"
ORDER BY "sr_type"
|
|
28 min
0.7%
|
92 ms
|
18,364
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($100,$101))) ORDER BY "asm_sr"."call_date" DESC LIMIT $102
|
|
28 min
0.7%
|
132 ms
|
12,728
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80)) AND (((("asm_so"."service_center_id" in ($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)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($167,$168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179,$180,$181)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($182,$183))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
28 min
0.7%
|
122 ms
|
13,800
odoo14
|
SELECT count($1) FROM "asm_sr" WHERE ("asm_sr"."sr_state_id" = $2) AND (((("asm_sr"."service_center_id" in ($3)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($4,$5,$6,$7)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($8,$9)))
|
|
28 min
0.7%
|
940 ms
|
1,775
odoo14
|
SELECT min("asm_sr".id) AS id, count("asm_sr".id) AS "client_type_count" , sum("asm_sr"."diff_last_activity_create") AS "diff_last_activity_create",sum("asm_sr"."so_count") AS "so_count","asm_sr"."client_type" as "client_type"
FROM "asm_sr"
WHERE ((((((((((("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($1)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $2 ) OR ("res_partner"."company_id" in ($3))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $4) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $5))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($6)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $7 ) OR ("res_partner"."company_id" in ($8))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $9) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $10))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($11)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $12 ) OR ("res_partner"."company_id" in ($13))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $14) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $15))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($16)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $17 ) OR ("res_partner"."company_id" in ($18))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $19) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $20))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($21)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $22 ) OR ("res_partner"."company_id" in ($23))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $24) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $25))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($26)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $27 ) OR ("res_partner"."company_id" in ($28))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $29) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $30))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($31)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $32 ) OR ("res_partner"."company_id" in ($33))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $34) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $35))) ORDER BY "res_partner"."id" ))) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (("asm_sr"."sr_state_id" in ($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)) OR "asm_sr"."sr_state_id" IS NULL)) AND (((("asm_sr"."service_center_id" in ($418,$419,$420,$421,$422,$423,$424,$425,$426,$427,$428,$429,$430)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($431,$432,$433,$434,$435)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($436,$437)))
GROUP BY "asm_sr"."client_type"
ORDER BY "client_type" ASC
LIMIT $438
|
|
25 min
0.7%
|
74 ms
|
20,757
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($12,$13,$14,$15)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($16))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
24 min
0.6%
|
74 ms
|
19,514
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($7,$8))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
23 min
0.6%
|
76 ms
|
18,423
odoo14
|
SELECT count($1) FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($101,$102)))
|
|
23 min
0.6%
|
78 ms
|
17,248
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."url"::text like $1)) ORDER BY "ir_attachment"."id" DESC
|
|
22 min
0.6%
|
235 ms
|
5,744
odoo14
|
SELECT DISTINCT ON(pid, cid) * FROM (
WITH sub_followers AS (
SELECT fol.id, fol.partner_id, fol.channel_id, subtype.internal
FROM mail_followers fol
RIGHT JOIN mail_followers_mail_message_subtype_rel subrel
ON subrel.mail_followers_id = fol.id
RIGHT JOIN mail_message_subtype subtype
ON subtype.id = subrel.mail_message_subtype_id
WHERE subrel.mail_message_subtype_id = $1 AND fol.res_model = $2 AND fol.res_id IN ($3)
)
SELECT partner.id as pid, $4::int AS cid,
partner.active as active, partner.partner_share as pshare, $5 as ctype,
users.notification_type AS notif, array_agg(groups.id) AS groups
FROM res_partner partner
LEFT JOIN res_users users ON users.partner_id = partner.id AND users.active
LEFT JOIN res_groups_users_rel groups_rel ON groups_rel.uid = users.id
LEFT JOIN res_groups groups ON groups.id = groups_rel.gid
WHERE EXISTS (
SELECT partner_id FROM sub_followers
WHERE sub_followers.channel_id IS NULL
AND sub_followers.partner_id = partner.id
AND (coalesce(sub_followers.internal, $6) <> $7 OR coalesce(partner.partner_share, $8) <> $9)
) OR partner.id IN ($10)
GROUP BY partner.id, users.notification_type
UNION
SELECT $11::int AS pid, channel.id AS cid,
$12 as active, $13 AS pshare, channel.channel_type AS ctype,
CASE WHEN channel.email_send = $14 THEN $15 ELSE $16 END AS notif, $17 AS groups
FROM mail_channel channel
WHERE EXISTS (
SELECT channel_id FROM sub_followers WHERE partner_id IS NULL AND sub_followers.channel_id = channel.id
)
) AS x
ORDER BY pid, cid, notif
|
|
22 min
0.6%
|
77 ms
|
17,408
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."person_id" = $1) AND ("asm_so"."so_state_id" = $2)) AND (((("asm_so"."service_center_id" in ($3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($16,$17,$18,$19,$20)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($21))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
20 min
0.5%
|
86 ms
|
14,321
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."so_state_id" = $1) AND ("asm_so"."so_type" = $2)) AND (((("asm_so"."service_center_id" in ($3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($37,$38))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
20 min
0.5%
|
99 ms
|
11,924
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
19 min
0.5%
|
93 ms
|
12,619
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($102,$103))) ORDER BY "asm_sr"."call_date" DESC LIMIT $104
|
|
19 min
0.5%
|
80 ms
|
14,582
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($103,$104))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
19 min
0.5%
|
103 ms
|
11,149
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
18 min
0.5%
|
144 ms
|
7,514
odoo14
|
UPDATE "asm_products" SET "contract_id"=$1,"product_qty"=$2,"service_center_id"=$3,"write_uid"=$4,"write_date"=(now() at time zone $5) WHERE 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, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005)
Covered by index on (id)
Rows: 131242
Row progression: 131242, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- so_id, id
- sr_id, id
|
|
18 min
0.5%
|
80 ms
|
13,465
odoo14
|
SELECT min("asm_so".id) AS id, count("asm_so".id) AS "so_state_id_count" , sum("asm_so"."diff_last_activity_create") AS "diff_last_activity_create","asm_so"."so_state_id" as "so_state_id"
FROM "asm_so" LEFT JOIN "asm_state" AS "asm_so__so_state_id" ON ("asm_so"."so_state_id" = "asm_so__so_state_id"."id") LEFT JOIN "ir_translation" AS "asm_so__so_state_id__name" ON ("asm_so__so_state_id"."id" = "asm_so__so_state_id__name"."res_id" AND "asm_so__so_state_id__name"."type" = $1 AND "asm_so__so_state_id__name"."name" = $2 AND "asm_so__so_state_id__name"."lang" = $3 AND "asm_so__so_state_id__name"."value" != $4)
WHERE (((("asm_so"."service_center_id" in ($5)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($6,$7,$8,$9)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($10)))
GROUP BY "asm_so"."so_state_id","asm_so__so_state_id"."sequence",COALESCE("asm_so__so_state_id__name"."value","asm_so__so_state_id"."name"),"asm_so__so_state_id"."id"
ORDER BY "asm_so__so_state_id"."sequence" ,COALESCE("asm_so__so_state_id__name"."value", "asm_so__so_state_id"."name") ,"asm_so__so_state_id"."id"
LIMIT $11
|
|
18 min
0.5%
|
100 ms
|
10,629
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE ("asm_sr"."product_type" in ($1)) ORDER BY "asm_sr"."name" DESC,"asm_sr"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON asm_sr (product_type, name)
Rows: 185312
Row progression: 185312, 4116, 0
Row estimates
- product_type (=): 4116
- name (sort): 1
Existing indexes
- id PRIMARY
- message_main_attachment_id
- name
|
|
16 min
0.4%
|
76 ms
|
12,654
odoo14
|
SELECT count($1) FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($103,$104)))
|
|
16 min
0.4%
|
97 ms
|
9,871
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
16 min
0.4%
|
99 ms
|
9,535
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
16 min
0.4%
|
103 ms
|
9,076
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
15 min
0.4%
|
72 ms
|
12,669
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($13,$14,$15,$16,$17)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($18))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
15 min
0.4%
|
107 ms
|
8,474
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
15 min
0.4%
|
97 ms
|
9,029
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
14 min
0.4%
|
80 ms
|
10,741
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."client_id" = $1) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($101,$102))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $103
|
|
14 min
0.4%
|
97 ms
|
8,752
odoo14
|
SELECT count($1) FROM "asm_so" WHERE ("asm_so"."so_state_id" = $2) AND (((("asm_so"."service_center_id" in ($3)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($4,$5,$6,$7)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($8)))
|
|
14 min
0.4%
|
108 ms
|
7,728
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
14 min
0.4%
|
74 ms
|
11,154
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (((("asm_so"."service_center_id" in ($1)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($2,$3,$4,$5)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($6))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $7
|
|
13 min
0.3%
|
129 ms
|
6,148
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80)) AND (((("asm_so"."service_center_id" in ($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)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($166,$167,$168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179,$180)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($181,$182))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
13 min
0.3%
|
110 ms
|
6,988
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
12 min
0.3%
|
106 ms
|
7,045
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
12 min
0.3%
|
84 ms
|
8,914
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($18,$19))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
12 min
0.3%
|
77 ms
|
9,580
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($102,$103))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
12 min
0.3%
|
378 ms
|
1,941
odoo14
|
SELECT min("asm_sr".id) AS id, count("asm_sr".id) AS "sr_state_id_count" , sum("asm_sr"."diff_last_activity_create") AS "diff_last_activity_create",sum("asm_sr"."so_count") AS "so_count","asm_sr"."sr_state_id" as "sr_state_id"
FROM "asm_sr" LEFT JOIN "asm_state" AS "asm_sr__sr_state_id" ON ("asm_sr"."sr_state_id" = "asm_sr__sr_state_id"."id") LEFT JOIN "ir_translation" AS "asm_sr__sr_state_id__name" ON ("asm_sr__sr_state_id"."id" = "asm_sr__sr_state_id__name"."res_id" AND "asm_sr__sr_state_id__name"."type" = $1 AND "asm_sr__sr_state_id__name"."name" = $2 AND "asm_sr__sr_state_id__name"."lang" = $3 AND "asm_sr__sr_state_id__name"."value" != $4)
WHERE ((("asm_sr"."last_activity_time" >= $5) AND (((("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($6)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $7 ) OR ("res_partner"."company_id" in ($8))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $9) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $10))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($11)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $12 ) OR ("res_partner"."company_id" in ($13))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $14) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $15))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($16)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $17 ) OR ("res_partner"."company_id" in ($18))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $19) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $20))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($21)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $22 ) OR ("res_partner"."company_id" in ($23))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $24) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $25))) ORDER BY "res_partner"."id" )))) AND (("asm_sr"."sr_type" != $26) OR "asm_sr"."sr_type" IS NULL)) AND (((("asm_sr"."service_center_id" in ($27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($38,$39,$40,$41,$42)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($43,$44)))
GROUP BY "asm_sr"."sr_state_id","asm_sr__sr_state_id"."sequence",COALESCE("asm_sr__sr_state_id__name"."value","asm_sr__sr_state_id"."name"),"asm_sr__sr_state_id"."id"
ORDER BY "asm_sr__sr_state_id"."sequence" ,COALESCE("asm_sr__sr_state_id__name"."value", "asm_sr__sr_state_id"."name") ,"asm_sr__sr_state_id"."id"
LIMIT $45
|
|
12 min
0.3%
|
73 ms
|
9,592
odoo14
|
SELECT count($1) FROM "asm_so" WHERE (((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($7)))
|
|
12 min
0.3%
|
90 ms
|
7,674
odoo14
|
SELECT "stock_production_lot".id FROM "stock_production_lot" WHERE (("stock_production_lot"."product_id" = $1) AND ("stock_production_lot"."name"::text ilike $2)) AND ("stock_production_lot"."company_id" in ($3)) ORDER BY "stock_production_lot"."id" LIMIT $4
|
|
11 min
0.3%
|
105 ms
|
6,485
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
11 min
0.3%
|
104 ms
|
6,438
odoo14
|
SELECT min("asm_so".id) AS id, count("asm_so".id) AS "so_state_id_count" , sum("asm_so"."diff_last_activity_create") AS "diff_last_activity_create","asm_so"."so_state_id" as "so_state_id"
FROM "asm_so" LEFT JOIN "asm_state" AS "asm_so__so_state_id" ON ("asm_so"."so_state_id" = "asm_so__so_state_id"."id") LEFT JOIN "ir_translation" AS "asm_so__so_state_id__name" ON ("asm_so__so_state_id"."id" = "asm_so__so_state_id__name"."res_id" AND "asm_so__so_state_id__name"."type" = $1 AND "asm_so__so_state_id__name"."name" = $2 AND "asm_so__so_state_id__name"."lang" = $3 AND "asm_so__so_state_id__name"."value" != $4)
WHERE ("asm_so"."so_type" = $5) AND (((("asm_so"."service_center_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,$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)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($104,$105)))
GROUP BY "asm_so"."so_state_id","asm_so__so_state_id"."sequence",COALESCE("asm_so__so_state_id__name"."value","asm_so__so_state_id"."name"),"asm_so__so_state_id"."id"
ORDER BY "asm_so__so_state_id"."sequence" ,COALESCE("asm_so__so_state_id__name"."value", "asm_so__so_state_id"."name") ,"asm_so__so_state_id"."id"
LIMIT $106
|
|
11 min
0.3%
|
91 ms
|
7,283
odoo14
|
SELECT "stock_valuation_layer".id FROM "stock_valuation_layer" WHERE (("stock_valuation_layer"."account_move_id" in ($1)) AND (("stock_valuation_layer"."id" not in ($2)) OR "stock_valuation_layer"."id" IS NULL)) ORDER BY "stock_valuation_layer"."create_date" ,"stock_valuation_layer"."id"
|
|
11 min
0.3%
|
357 ms
|
1,838
odoo14
|
SELECT min("asm_sr".id) AS id, count("asm_sr".id) AS "client_type_count" , sum("asm_sr"."diff_last_activity_create") AS "diff_last_activity_create",sum("asm_sr"."so_count") AS "so_count","asm_sr"."client_type" as "client_type"
FROM "asm_sr"
WHERE (("asm_sr"."sr_state_id" = $1) AND ((("asm_sr"."last_activity_time" >= $2) AND (((("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($3)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $4 ) OR ("res_partner"."company_id" in ($5))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $6) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $7))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($8)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $9 ) OR ("res_partner"."company_id" in ($10))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $11) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $12))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($13)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $14 ) OR ("res_partner"."company_id" in ($15))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $16) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $17))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($18)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $19 ) OR ("res_partner"."company_id" in ($20))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $21) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $22))) ORDER BY "res_partner"."id" )))) AND (("asm_sr"."sr_type" != $23) OR "asm_sr"."sr_type" IS NULL))) AND (((("asm_sr"."service_center_id" in ($24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($35,$36,$37,$38,$39)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($40,$41)))
GROUP BY "asm_sr"."client_type"
ORDER BY "client_type"
|
|
11 min
0.3%
|
172 ms
|
3,801
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND ((((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($7))) AND (("asm_so"."person_id" = $8) AND ((("asm_so"."so_state_id" in ($9)) OR ("asm_so"."so_state_id" in ($10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23))) OR $24))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $25
|
|
11 min
0.3%
|
351 ms
|
1,815
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE (("asm_sr"."client_type" = $1) AND (("asm_sr"."sr_state_id" = $2) AND ((("asm_sr"."last_activity_time" >= $3) AND (((("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($4)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $5 ) OR ("res_partner"."company_id" in ($6))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $7) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $8))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($9)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $10 ) OR ("res_partner"."company_id" in ($11))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $12) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $13))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($14)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $15 ) OR ("res_partner"."company_id" in ($16))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $17) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $18))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($19)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $20 ) OR ("res_partner"."company_id" in ($21))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $22) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $23))) ORDER BY "res_partner"."id" )))) AND (("asm_sr"."sr_type" != $24) OR "asm_sr"."sr_type" IS NULL)))) AND (((("asm_sr"."service_center_id" in ($25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($36,$37,$38,$39,$40)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($41,$42))) ORDER BY "asm_sr"."call_date" DESC LIMIT $43
|
|
10 min
0.3%
|
80 ms
|
7,739
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."client_id" = $1) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($103,$104))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $105
|
|
10 min
0.3%
|
75 ms
|
7,828
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ((((("asm_so"."service_center_id" in ($1)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($2,$3,$4,$5,$6)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($7))) AND (("asm_so"."person_id" = $8) AND ((("asm_so"."so_state_id" in ($9)) OR ("asm_so"."so_state_id" in ($10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23))) OR $24))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $25
|
|
10 min
0.3%
|
199 ms
|
2,942
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND ((((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6,$7)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($8,$9))) AND (("asm_so"."person_id" = $10) AND ((("asm_so"."so_state_id" in ($11)) OR ("asm_so"."so_state_id" in ($12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25))) OR $26))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $27
|
|
10 min
0.3%
|
34 ms
|
17,224
odoo14
|
UPDATE account_move SET write_date = write_date WHERE id = (
SELECT id FROM account_move
WHERE journal_id = $1 AND name != $2 AND date_trunc($3, date::timestamp without time zone) = date_trunc($4, $5::date) AND sequence_prefix !~ $6 AND move_type NOT IN ($7, $8) AND id != $9
AND sequence_prefix = (SELECT sequence_prefix FROM account_move WHERE journal_id = $10 AND name != $11 AND date_trunc($12, date::timestamp without time zone) = date_trunc($13, $14::date) AND sequence_prefix !~ $15 AND move_type NOT IN ($16, $17) AND id != $18 ORDER BY id DESC LIMIT $19)
ORDER BY sequence_number DESC
LIMIT $20
)
RETURNING name
Covered by index on (id)
Rows: 319672
Row progression: 319672, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- date
- invoice_date
- invoice_date_due
- journal_id, id DESC, sequence_prefix
- journal_id, sequence_prefix DESC, sequence_number DESC, name
- message_main_attachment_id
- move_type
- name
- payment_id
- payment_reference
- so_id
- stock_move_id
|
|
10 min
0.3%
|
72 ms
|
8,003
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($15,$16,$17,$18,$19)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($20))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
9 min
0.2%
|
91 ms
|
6,079
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($101,$102))) ORDER BY "asm_sr"."call_date" DESC LIMIT $103
|
|
9 min
0.2%
|
109 ms
|
5,040
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
9 min
0.2%
|
71 ms
|
7,542
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($12,$13,$14,$15)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($16))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
9 min
0.2%
|
76 ms
|
6,951
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($3,$4,$5,$6)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($7))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
8 min
0.2%
|
492 ms
|
1,029
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123,$124,$125,$126,$127,$128,$129,$130,$131,$132,$133,$134,$135,$136,$137,$138,$139,$140,$141,$142,$143,$144,$145,$146,$147,$148,$149,$150,$151,$152,$153,$154,$155,$156,$157,$158,$159,$160,$161,$162,$163,$164,$165,$166,$167,$168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179,$180,$181,$182,$183,$184,$185,$186,$187,$188,$189,$190,$191,$192,$193,$194,$195,$196,$197,$198,$199,$200,$201,$202,$203,$204,$205,$206,$207,$208,$209,$210,$211,$212,$213,$214,$215,$216,$217,$218,$219,$220,$221,$222,$223,$224,$225,$226,$227,$228,$229,$230,$231,$232,$233,$234,$235,$236,$237,$238,$239,$240,$241,$242,$243,$244,$245,$246,$247,$248,$249,$250,$251,$252,$253,$254,$255,$256,$257,$258,$259,$260,$261,$262,$263,$264,$265,$266,$267,$268,$269,$270,$271,$272,$273,$274,$275,$276,$277,$278,$279,$280,$281,$282,$283,$284,$285,$286,$287,$288,$289,$290,$291,$292,$293,$294,$295,$296,$297,$298,$299,$300,$301,$302,$303,$304,$305,$306,$307,$308,$309,$310,$311,$312,$313,$314,$315,$316,$317,$318,$319,$320,$321,$322,$323,$324,$325,$326,$327,$328,$329,$330,$331,$332,$333,$334,$335,$336,$337,$338,$339,$340,$341,$342,$343,$344,$345,$346,$347,$348,$349,$350,$351,$352,$353,$354,$355,$356,$357,$358,$359,$360,$361,$362,$363,$364,$365,$366,$367,$368,$369,$370,$371,$372,$373,$374,$375,$376,$377,$378,$379,$380,$381,$382,$383,$384,$385,$386,$387,$388,$389,$390,$391,$392,$393,$394,$395,$396,$397,$398,$399,$400,$401,$402,$403,$404,$405,$406,$407,$408,$409,$410,$411,$412,$413,$414,$415,$416,$417,$418,$419,$420,$421,$422,$423,$424,$425,$426,$427,$428,$429,$430,$431,$432,$433,$434,$435,$436,$437,$438,$439,$440,$441,$442,$443,$444,$445,$446,$447,$448,$449,$450,$451,$452,$453,$454,$455,$456,$457,$458,$459,$460,$461,$462,$463,$464,$465,$466,$467,$468,$469,$470,$471,$472,$473,$474,$475,$476,$477,$478,$479,$480,$481,$482,$483,$484,$485,$486,$487,$488,$489,$490,$491,$492,$493,$494,$495,$496,$497,$498,$499,$500,$501,$502,$503,$504,$505,$506,$507,$508,$509,$510,$511,$512,$513,$514,$515,$516,$517,$518,$519,$520,$521,$522,$523,$524,$525,$526,$527,$528,$529,$530,$531,$532,$533,$534,$535,$536,$537,$538,$539,$540,$541,$542,$543,$544,$545,$546,$547,$548,$549,$550,$551,$552,$553,$554,$555,$556,$557,$558,$559,$560,$561,$562,$563,$564,$565,$566,$567,$568,$569,$570,$571,$572,$573,$574,$575,$576,$577,$578,$579,$580,$581,$582,$583,$584,$585,$586,$587,$588,$589,$590,$591,$592,$593,$594,$595,$596,$597,$598,$599,$600,$601,$602,$603,$604,$605,$606,$607,$608,$609,$610,$611,$612,$613,$614,$615,$616,$617,$618,$619,$620,$621,$622,$623,$624,$625,$626,$627,$628,$629,$630,$631,$632,$633,$634,$635,$636,$637,$638,$639,$640,$641,$642,$643,$644,$645,$646,$647,$648,$649,$650,$651,$652,$653,$654,$655,$656,$657,$658,$659,$660,$661,$662,$663,$664,$665,$666,$667,$668,$669,$670,$671,$672,$673,$674,$675,$676,$677,$678,$679,$680,$681,$682,$683,$684,$685,$686,$687,$688,$689,$690,$691,$692,$693,$694,$695,$696,$697,$698,$699,$700,$701,$702,$703,$704,$705,$706,$707,$708,$709,$710,$711,$712,$713,$714,$715,$716,$717,$718,$719,$720,$721,$722,$723,$724,$725,$726,$727,$728,$729,$730,$731,$732,$733,$734,$735,$736,$737,$738,$739,$740,$741,$742,$743,$744,$745,$746,$747,$748,$749,$750,$751,$752,$753,$754,$755,$756,$757,$758,$759,$760,$761,$762,$763,$764,$765,$766,$767,$768,$769,$770,$771,$772,$773,$774,$775,$776,$777,$778,$779,$780,$781,$782,$783,$784,$785,$786,$787,$788,$789,$790,$791,$792,$793,$794,$795,$796,$797,$798,$799,$800,$801,$802,$803,$804,$805,$806,$807,$808,$809,$810,$811,$812,$813,$814,$815,$816,$817,$818,$819,$820,$821,$822,$823,$824,$825,$826,$827,$828,$829,$830,$831,$832,$833,$834,$835,$836,$837,$838,$839,$840,$841,$842,$843,$844,$845,$846,$847,$848,$849,$850,$851,$852,$853,$854,$855,$856,$857,$858,$859,$860,$861,$862,$863,$864,$865,$866,$867,$868,$869,$870,$871,$872,$873,$874,$875,$876,$877,$878,$879,$880,$881,$882,$883,$884,$885,$886,$887,$888,$889,$890,$891,$892,$893,$894,$895,$896,$897,$898,$899,$900,$901,$902,$903,$904,$905,$906,$907,$908,$909,$910,$911,$912,$913,$914,$915,$916,$917,$918,$919,$920,$921,$922,$923,$924,$925,$926,$927,$928,$929,$930,$931,$932,$933,$934,$935,$936,$937,$938,$939,$940,$941,$942,$943,$944,$945,$946,$947,$948,$949,$950,$951,$952,$953,$954,$955,$956,$957,$958,$959,$960,$961,$962,$963,$964,$965,$966,$967,$968,$969,$970,$971,$972,$973,$974,$975,$976,$977,$978,$979,$980,$981,$982,$983,$984,$985,$986,$987,$988,$989,$990,$991,$992,$993,$994,$995,$996,$997,$998,$999,$1000)) AND (((("asm_so"."service_center_id" in ($1001,$1002,$1003,$1004,$1005,$1006,$1007,$1008,$1009,$1010,$1011,$1012,$1013,$1014,$1015,$1016,$1017,$1018,$1019,$1020,$1021,$1022,$1023,$1024,$1025,$1026,$1027,$1028,$1029,$1030,$1031,$1032,$1033,$1034,$1035,$1036,$1037,$1038,$1039,$1040,$1041,$1042,$1043,$1044,$1045,$1046,$1047,$1048,$1049,$1050,$1051,$1052,$1053,$1054,$1055,$1056,$1057,$1058,$1059,$1060,$1061,$1062,$1063,$1064,$1065,$1066,$1067,$1068,$1069,$1070,$1071,$1072,$1073,$1074,$1075,$1076,$1077,$1078,$1079,$1080,$1081,$1082,$1083,$1084,$1085)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($1086,$1087,$1088,$1089,$1090,$1091,$1092,$1093,$1094,$1095,$1096,$1097,$1098,$1099)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($1100,$1101))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
8 min
0.2%
|
153 ms
|
3,288
odoo14
|
SELECT min("asm_so".id) AS id, count("asm_so".id) AS "so_state_id_count" , sum("asm_so"."diff_last_activity_create") AS "diff_last_activity_create","asm_so"."so_state_id" as "so_state_id"
FROM "asm_so" LEFT JOIN "asm_state" AS "asm_so__so_state_id" ON ("asm_so"."so_state_id" = "asm_so__so_state_id"."id") LEFT JOIN "ir_translation" AS "asm_so__so_state_id__name" ON ("asm_so__so_state_id"."id" = "asm_so__so_state_id__name"."res_id" AND "asm_so__so_state_id__name"."type" = $1 AND "asm_so__so_state_id__name"."name" = $2 AND "asm_so__so_state_id__name"."lang" = $3 AND "asm_so__so_state_id__name"."value" != $4)
WHERE (((("asm_so"."service_center_id" in ($5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($18,$19,$20,$21,$22)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($23)))
GROUP BY "asm_so"."so_state_id","asm_so__so_state_id"."sequence",COALESCE("asm_so__so_state_id__name"."value","asm_so__so_state_id"."name"),"asm_so__so_state_id"."id"
ORDER BY "asm_so__so_state_id"."sequence" ,COALESCE("asm_so__so_state_id__name"."value", "asm_so__so_state_id"."name") ,"asm_so__so_state_id"."id"
LIMIT $24
|
|
8 min
0.2%
|
109 ms
|
4,529
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE ("ir_attachment"."res_field" IS NULL AND ("ir_attachment"."activity_line_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15))) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (activity_line_id)
Rows: 326820
Row progression: 326820, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 210527
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
8 min
0.2%
|
72 ms
|
6,726
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."so_state_id" = $1) AND ("asm_so"."service_center_id" = $2)) AND (((("asm_so"."service_center_id" in ($3)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($4,$5,$6,$7)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($8))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
8 min
0.2%
|
136 ms
|
3,385
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80)) AND (((("asm_so"."service_center_id" in ($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)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179,$180,$181,$182)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($183,$184))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
8 min
0.2%
|
82 ms
|
5,537
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1)) AND (((("asm_so"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($104,$105))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
8 min
0.2%
|
74 ms
|
6,090
odoo14
|
SELECT count($1) FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($102,$103)))
|