|
1 min
7%
|
827 ms
|
52
odoo14
|
SELECT schemaname AS schema, t.relname AS table, ix.relname AS name, regexp_replace(pg_get_indexdef(i.indexrelid), $1, $2) AS columns, regexp_replace(pg_get_indexdef(i.indexrelid), $3, $4) AS using, indisunique AS unique, indisprimary AS primary, indisvalid AS valid, indexprs::text, indpred::text, pg_get_indexdef(i.indexrelid) AS definition FROM pg_index i INNER JOIN pg_class t ON t.oid = i.indrelid INNER JOIN pg_class ix ON ix.oid = i.indexrelid LEFT JOIN pg_stat_user_indexes ui ON ui.indexrelid = i.indexrelid WHERE schemaname IS NOT NULL ORDER BY 1, 2 /*pghero*/
|
|
0 min
5%
|
141 ms
|
208
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."client_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)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($5))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
4%
|
930 ms
|
26
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
|
|
0 min
4%
|
231 ms
|
99
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: 399048
Row progression: 399048, 4
Row estimates
- sr_id (=): 4
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
4%
|
695 ms
|
31
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_type" = $1) AND (("asm_sr"."sr_state_id" = $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" ))))) AND (((("asm_sr"."service_center_id" in ($18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($33,$34,$35,$36,$37)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($38,$39)))
GROUP BY "asm_sr"."client_type"
ORDER BY "client_type"
|
|
0 min
3%
|
5,897 ms
|
3
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
|
|
0 min
3%
|
154 ms
|
111
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)
|
|
0 min
3%
|
226 ms
|
75
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
|
|
0 min
3%
|
1,046 ms
|
16
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"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($5)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $6 ) OR ("res_partner"."company_id" in ($7))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $8) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $9))) ORDER BY "res_partner"."id" )) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($10)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $11 ) OR ("res_partner"."company_id" in ($12))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $13) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $14))) ORDER BY "res_partner"."id" ))) OR ("asm_sr"."client_id" in (SELECT "res_partner".id FROM "res_partner" WHERE ("res_partner"."state_id" in ($15)) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = $16 ) OR ("res_partner"."company_id" in ($17))) OR "res_partner"."company_id" IS NULL ) AND (((("res_partner"."type" != $18) OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL ) OR ("res_partner"."type" = $19))) ORDER BY "res_partner"."id" ))) AND (((("asm_sr"."service_center_id" in ($20,$21,$22,$23,$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"."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 $42
|
|
0 min
3%
|
988 ms
|
16
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,$103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($124,$125,$126,$127,$128,$129,$130,$131,$132,$133,$134,$135,$136,$137,$138)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($139,$140))) ORDER BY "asm_sr"."call_date" DESC LIMIT $141
|
|
0 min
2%
|
113 ms
|
121
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: 209433
Row progression: 209433, 1
Row estimates
- sr_id (=): 1
- name (sort): 1
Existing indexes
- id PRIMARY
- message_main_attachment_id
- name
|
|
0 min
2%
|
256 ms
|
53
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,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($124,$125))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
2%
|
149 ms
|
84
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,$15,$16)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($17,$18,$19,$20,$21)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($22))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
2%
|
135 ms
|
89
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)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($17,$18,$19,$20,$21)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($22))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
2%
|
205 ms
|
54
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)))
|
|
0 min
2%
|
591 ms
|
16
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE (("asm_sr"."client_type" = $1) AND (("asm_sr"."sr_type" = $2) AND (("asm_sr"."sr_state_id" = $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" )))))) AND (((("asm_sr"."service_center_id" in ($19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($34,$35,$36,$37,$38)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($39,$40))) ORDER BY "asm_sr"."call_date" DESC LIMIT $41
|
|
0 min
2%
|
359 ms
|
26
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
|
|
0 min
2%
|
193 ms
|
48
odoo14
|
WITH query_stats AS ( SELECT LEFT(query, $1) AS query, queryid AS query_hash, rolname AS user, (total_time / $2 / $3) AS total_minutes, (total_time / calls) AS average_time, calls FROM pg_stat_statements INNER JOIN pg_database ON pg_database.oid = pg_stat_statements.dbid INNER JOIN pg_roles ON pg_roles.oid = pg_stat_statements.userid WHERE calls > $4 AND pg_database.datname = current_database() ) SELECT query, query_hash, query_stats.user, total_minutes, average_time, calls, total_minutes * $5 / (SELECT SUM(total_minutes) FROM query_stats) AS total_percent, (SELECT SUM(total_minutes) FROM query_stats) AS all_queries_total_minutes FROM query_stats ORDER BY "total_minutes" DESC LIMIT $6 /*pghero*/
|
|
0 min
2%
|
559 ms
|
16
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"."sr_state_id" = $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" )))) AND (((("asm_sr"."service_center_id" in ($17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($32,$33,$34,$35,$36)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($37,$38)))
GROUP BY "asm_sr"."sr_type"
ORDER BY "sr_type"
|
|
0 min
1%
|
221 ms
|
39
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
1%
|
305 ms
|
26
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,$168,$169,$170,$171,$172,$173,$174,$175,$176,$177,$178,$179,$180,$181,$182,$183,$184,$185,$186,$187)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($188,$189,$190,$191,$192,$193,$194,$195,$196,$197,$198,$199,$200,$201,$202)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($203,$204))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
1%
|
490 ms
|
16
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
|
|
0 min
1%
|
645 ms
|
12
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: 356998
Row progression: 356998, 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
|
|
0 min
1%
|
192 ms
|
39
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
1%
|
252 ms
|
26
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,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($123,$124))) ORDER BY "asm_sr"."call_date" DESC LIMIT $125
|
|
0 min
1%
|
129 ms
|
46
odoo14
|
SELECT n.nspname AS table_schema, c.relname AS table, attname AS column, format_type(a.atttypid, a.atttypmod) AS column_type, pg_get_expr(d.adbin, d.adrelid) AS default_value FROM pg_catalog.pg_attribute a INNER JOIN pg_catalog.pg_class c ON c.oid = a.attrelid INNER JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace INNER JOIN pg_catalog.pg_attrdef d ON (a.attrelid, a.attnum) = (d.adrelid, d.adnum) WHERE NOT a.attisdropped AND a.attnum > $1 AND pg_get_expr(d.adbin, d.adrelid) LIKE $2 AND n.nspname NOT LIKE $3 /*pghero*/
|
|
0 min
1%
|
60 ms
|
97
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: 118150
Row progression: 118150, 1
Row estimates
- sr_id (=): 1
- id (sort): 1
Existing indexes
- id PRIMARY
- so_id
|
|
0 min
1.0%
|
20 ms
|
278
odoo14
|
SELECT "asm_so"."id" as "id", "asm_so"."sr_id" as "sr_id", "asm_so"."sr_state_id" as "sr_state_id", "asm_so"."sr_state_type" as "sr_state_type", "asm_so"."so_type" as "so_type", "asm_so"."so_state_id" as "so_state_id", "asm_so"."is_closed" as "is_closed", "asm_so"."is_locked" as "is_locked", "asm_so"."name" as "name", "asm_so"."person_id" as "person_id", "asm_so"."car_id" as "car_id", "asm_so"."client_id" as "client_id", "asm_so"."client_type" as "client_type", "asm_so"."contract_id" as "contract_id", "asm_so"."service_center_id" as "service_center_id", "asm_so"."sr_type" as "sr_type", "asm_so"."pref_date_start" as "pref_date_start", "asm_so"."pref_date_end" as "pref_date_end", "asm_so"."diagnose_id" as "diagnose_id", "asm_so"."diagnose_description" as "diagnose_description", "asm_so"."diagnose_warranty" as "diagnose_warranty", "asm_so"."final_diagnose_id" as "final_diagnose_id", "asm_so"."final_diagnose_description" as "final_diagnose_description", "asm_so"."final_diagnose_warranty" as "final_diagnose_warranty", "asm_so"."scheduled_date" as "scheduled_date", "asm_so"."product_type" as "product_type", "asm_so"."service_to_charge" as "service_to_charge", "asm_so"."product_id" as "product_id", "asm_so"."product_brand" as "product_brand", "asm_so"."product_serial_id" as "product_serial_id", "asm_so"."product_serial_warranty_id" as "product_serial_warranty_id", "asm_so"."product_serial_warranty" as "product_serial_warranty", "asm_so"."current_product_serial_warranty" as "current_product_serial_warranty", "asm_so"."pricelist_id" as "pricelist_id", "asm_so"."invoice_count" as "invoice_count", "asm_so"."delivery_picking_id" as "delivery_picking_id", "asm_so"."pull_type" as "pull_type", "asm_so"."reg_warranty_id" as "reg_warranty_id", "asm_so"."reg_serial" as "reg_serial", "asm_so"."error_return" as "error_return", "asm_so"."error_warranty" as "error_warranty", "asm_so"."last_activity_time" as "last_activity_time", "asm_so"."diff_last_activity_create" as "diff_last_activity_create", "asm_so"."work_description" as "work_description", "asm_so"."related_soo_service_center_id" as "related_soo_service_center_id", "asm_so"."amount_paid" as "amount_paid", "asm_so"."invoice_amounts" as "invoice_amounts", "asm_so"."req_qty" as "req_qty", "asm_so"."waiting_qty" as "waiting_qty", "asm_so"."cancelled_qty" as "cancelled_qty", "asm_so"."rec_qty" as "rec_qty", "asm_so"."diff_qty" as "diff_qty", "asm_so"."installed_qty" as "installed_qty", "asm_so"."to_return_qty" as "to_return_qty", "asm_so"."returned_qty" as "returned_qty", "asm_so"."damaged_qty" as "damaged_qty", "asm_so"."rec_damaged_qty" as "rec_damaged_qty", "asm_so"."not_rec_damaged_qty" as "not_rec_damaged_qty", "asm_so"."req_cost" as "req_cost", "asm_so"."waiting_cost" as "waiting_cost", "asm_so"."cancelled_cost" as "cancelled_cost", "asm_so"."rec_cost" as "rec_cost", "asm_so"."diff_cost" as "diff_cost", "asm_so"."to_return_cost" as "to_return_cost", "asm_so"."returned_cost" as "returned_cost", "asm_so"."damaged_cost" as "damaged_cost", "asm_so"."rec_damaged_cost" as "rec_damaged_cost", "asm_so"."not_rec_damaged_cost" as "not_rec_damaged_cost", "asm_so"."installed_cost" as "installed_cost", "asm_so"."installed_price" as "installed_price", "asm_so"."installed_price_tax_exl" as "installed_price_tax_exl", "asm_so"."service_qty" as "service_qty", "asm_so"."service_price" as "service_price", "asm_so"."order_total_price" as "order_total_price", "asm_so"."message_main_attachment_id" as "message_main_attachment_id", "asm_so"."create_uid" as "create_uid", "asm_so"."create_date" as "create_date", "asm_so"."write_uid" as "write_uid", "asm_so"."write_date" as "write_date" FROM "asm_so" WHERE (((("asm_so"."service_center_id" in ($1,$2,$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))) AND "asm_so".id IN ($22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005, $1006, $1007, $1008, $1009, $1010, $1011, $1012, $1013, $1014, $1015, $1016, $1017, $1018, $1019, $1020, $1021)
|
|
0 min
0.8%
|
808 ms
|
6
odoo14
|
WITH currency_rate AS (
SELECT
r.currency_id,
COALESCE(r.company_id, c.id) as company_id,
r.rate,
r.name AS date_start,
(SELECT name FROM res_currency_rate r2
WHERE r2.name > r.name AND
r2.currency_id = r.currency_id AND
(r2.company_id is null or r2.company_id = c.id)
ORDER BY r2.name ASC
LIMIT $1) AS date_end
FROM res_currency_rate r
JOIN res_company c ON (r.company_id is null or r.company_id = c.id)
)
SELECT
SUM(
l.price_unit / (CASE COALESCE(cr.rate, $2) WHEN $3 THEN $4 ELSE cr.rate END) *
l.quantity * (CASE WHEN i.move_type IN ($5, $6) THEN $7 ELSE $8 END) * (($9 - l.discount) * $10)
) / NULLIF(SUM(l.quantity * (CASE WHEN i.move_type IN ($11, $12) THEN $13 ELSE $14 END)), $15) AS avg_unit_price,
SUM(l.quantity * (CASE WHEN i.move_type IN ($16, $17) THEN $18 ELSE $19 END)) AS num_qty,
SUM(ABS(l.balance) * (CASE WHEN i.move_type IN ($20, $21) THEN $22 ELSE $23 END)) AS total,
SUM(l.quantity * pt.list_price * (CASE WHEN i.move_type IN ($24, $25) THEN $26 ELSE $27 END)) AS sale_expected
FROM account_move_line l
LEFT JOIN account_move i ON (l.move_id = i.id)
LEFT JOIN product_product product ON (product.id=l.product_id)
LEFT JOIN product_template pt ON (pt.id = product.product_tmpl_id)
left join currency_rate cr on
(cr.currency_id = i.currency_id and
cr.company_id = i.company_id and
cr.date_start <= COALESCE(i.invoice_date, NOW()) and
(cr.date_end IS NULL OR cr.date_end > COALESCE(i.invoice_date, NOW())))
WHERE l.product_id = $28
AND i.state IN ($29)
AND i.payment_state IN ($30, $31)
AND i.move_type IN ($32, $33)
AND i.invoice_date BETWEEN $34 AND $35
AND i.company_id = $36
AND l.display_type IS NULL
AND l.exclude_from_invoice_tab = $37
|
|
0 min
0.8%
|
186 ms
|
26
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,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($124,$125)))
|
|
0 min
0.8%
|
954 ms
|
5
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
|
|
0 min
0.8%
|
217 ms
|
21
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
|
|
0 min
0.7%
|
192 ms
|
22
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."so_state_id" = $1) AND (((("asm_so"."service_center_id" in ($2,$3)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($4,$5,$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))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.7%
|
139 ms
|
29
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."service_center_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,$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))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.7%
|
13 ms
|
309
odoo14
|
SELECT "asm_sr"."id" as "id", "asm_sr"."sr_state_id" as "sr_state_id", "asm_sr"."sr_type" as "sr_type" FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($1)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($2,$3,$4,$5)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($6,$7))) AND "asm_sr".id IN ($8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005, $1006, $1007)
|
|
0 min
0.6%
|
666 ms
|
5
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
|
|
0 min
0.6%
|
160 ms
|
20
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."so_state_id" = $1) AND ("asm_so"."service_center_id" in (SELECT "asm_service_center".id FROM "asm_service_center" WHERE ("asm_service_center"."name"::text ilike $2) ORDER BY "asm_service_center"."id" ))) 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
|
|
0 min
0.5%
|
240 ms
|
13
odoo14
|
SELECT "sms_sms".id FROM "sms_sms" WHERE ("sms_sms"."state" = $1) ORDER BY "sms_sms"."id" DESC LIMIT $2
Details
CREATE INDEX CONCURRENTLY ON sms_sms (state, id)
Rows: 111132
Row progression: 111132, 111132, 1
Row estimates
- state (=): 111132
- id (sort): 1
Existing indexes
- id PRIMARY
- mail_message_id
|
|
0 min
0.5%
|
2 ms
|
1,371
odoo14
|
SELECT "ir_ui_view".id FROM "ir_ui_view" WHERE (("ir_ui_view"."active" = $1) AND ("ir_ui_view"."key" = $2)) ORDER BY "ir_ui_view"."priority" ,"ir_ui_view"."name" ,"ir_ui_view"."id" LIMIT $3
Details
CREATE INDEX CONCURRENTLY ON ir_ui_view (key)
Rows: 2174
Row progression: 2174, 1
Row estimates
- key (=): 1
- active (=): 1087
- priority (sort): 53
- name (sort): 1
- id (sort): 1
Existing indexes
- id PRIMARY
- inherit_id
- model
- model, inherit_id
|
|
0 min
0.5%
|
324 ms
|
9
odoo14
|
SELECT min("asm_sr".id) AS id, count("asm_sr".id) AS "sr_state_id_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"."service_center_id" in ($5)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($6,$7,$8,$9)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($10,$11)))
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"
|
|
0 min
0.5%
|
160 ms
|
18
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,$8))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.5%
|
0 ms
|
10,913
odoo14
|
INSERT INTO "asm_products" ("id", "create_uid", "create_date", "write_uid", "write_date", "location_id", "product_id", "product_uom_id", "product_uom_qty", "so_id", "sr_id") VALUES (nextval($1), $2, (now() at time zone $3), $4, (now() at time zone $5), $6, $7, $8, $9, $10, $11) RETURNING id
|
|
0 min
0.4%
|
246 ms
|
10
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.4%
|
243 ms
|
10
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
|
|
0 min
0.4%
|
232 ms
|
10
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE ("asm_sr"."sr_state_id" = $1) AND (((("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,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($124,$125))) ORDER BY "asm_sr"."name" DESC,"asm_sr"."id" DESC LIMIT $126
|
|
0 min
0.4%
|
244 ms
|
9
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE (((("asm_sr"."service_center_id" in ($1)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($2,$3,$4,$5)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($6,$7))) ORDER BY "asm_sr"."name" DESC,"asm_sr"."id" DESC
|
|
0 min
0.4%
|
240 ms
|
9
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"
|
|
0 min
0.4%
|
127 ms
|
17
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."person_id" = $1) AND (("asm_so"."service_center_id" = $2) AND ("asm_so"."so_state_id" = $3))) AND (((("asm_so"."service_center_id" in ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($19,$20,$21,$22,$23)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($24))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.4%
|
215 ms
|
10
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."person_id" in ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22)) AND (((("asm_so"."service_center_id" in ($23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($38,$39,$40,$41,$42)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($43))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.4%
|
293 ms
|
7
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.3%
|
0 ms
|
23,382
odoo14
|
DISCARD ALL
|
|
0 min
0.3%
|
137 ms
|
14
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
|
|
0 min
0.3%
|
157 ms
|
12
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,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($124,$125))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $126
|
|
0 min
0.3%
|
235 ms
|
8
odoo14
|
SELECT count($1) FROM "asm_sr" WHERE ("asm_sr"."sr_state_id" = $2) AND (((("asm_sr"."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,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$109)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123,$124)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($125,$126)))
|
|
0 min
0.3%
|
312 ms
|
6
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: 1339700
Row progression: 1339700, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- so_id, id
- sr_id, id
|
|
0 min
0.3%
|
181 ms
|
10
odoo14
|
SELECT min("asm_so".id) AS id, count("asm_so".id) AS "service_center_id_count" , sum("asm_so"."diff_last_activity_create") AS "diff_last_activity_create","asm_so"."service_center_id" as "service_center_id"
FROM "asm_so" LEFT JOIN "asm_service_center" AS "asm_so__service_center_id" ON ("asm_so"."service_center_id" = "asm_so__service_center_id"."id")
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,$15,$16)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($17,$18,$19,$20,$21)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($22)))
GROUP BY "asm_so"."service_center_id","asm_so__service_center_id"."id"
ORDER BY "asm_so__service_center_id"."id"
|
|
0 min
0.3%
|
443 ms
|
4
odoo14
|
SELECT "stock_move_line".id FROM "stock_move_line" LEFT JOIN "stock_quant_package" AS "stock_move_line__result_package_id" ON ("stock_move_line"."result_package_id" = "stock_move_line__result_package_id"."id") WHERE (("stock_move_line"."lot_id" in ($1)) AND ("stock_move_line"."state" = $2)) AND ("stock_move_line"."company_id" IS NULL OR ("stock_move_line"."company_id" in ($3))) ORDER BY "stock_move_line__result_package_id"."name" DESC,"stock_move_line"."id"
|
|
0 min
0.3%
|
218 ms
|
8
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."so_state_id" = $1) AND (("asm_so"."service_center_id" in (SELECT "asm_service_center".id FROM "asm_service_center" WHERE ("asm_service_center"."name"::text ilike $2) ORDER BY "asm_service_center"."id" )) AND (("asm_so"."last_activity_time" >= $3) AND ("asm_so"."last_activity_time" <= $4)))) AND (((("asm_so"."service_center_id" in ($5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($39,$40))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.3%
|
7 ms
|
227
odoo14
|
SELECT "asm_sr"."id" as "id", "asm_sr"."sr_state_id" as "sr_state_id", "asm_sr"."sr_type" as "sr_type" 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,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($123,$124))) AND "asm_sr".id IN ($125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005, $1006, $1007, $1008, $1009, $1010, $1011, $1012, $1013, $1014, $1015, $1016, $1017, $1018, $1019, $1020, $1021, $1022, $1023, $1024, $1025, $1026, $1027, $1028, $1029, $1030, $1031, $1032, $1033, $1034, $1035, $1036, $1037, $1038, $1039, $1040, $1041, $1042, $1043, $1044, $1045, $1046, $1047, $1048, $1049, $1050, $1051, $1052, $1053, $1054, $1055, $1056, $1057, $1058, $1059, $1060, $1061, $1062, $1063, $1064, $1065, $1066, $1067, $1068, $1069, $1070, $1071, $1072, $1073, $1074, $1075, $1076, $1077, $1078, $1079, $1080, $1081, $1082, $1083, $1084, $1085, $1086, $1087, $1088, $1089, $1090, $1091, $1092, $1093, $1094, $1095, $1096, $1097, $1098, $1099, $1100, $1101, $1102, $1103, $1104, $1105, $1106, $1107, $1108, $1109, $1110, $1111, $1112, $1113, $1114, $1115, $1116, $1117, $1118, $1119, $1120, $1121, $1122, $1123, $1124)
|
|
0 min
0.3%
|
518 ms
|
3
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"
|
|
0 min
0.3%
|
388 ms
|
4
odoo14
|
SELECT min("asm_so".id) AS id, count("asm_so".id) AS "client_id_count" , sum("asm_so"."diff_last_activity_create") AS "diff_last_activity_create","asm_so"."client_id" as "client_id"
FROM "asm_so" LEFT JOIN "res_partner" AS "asm_so__client_id" ON ("asm_so"."client_id" = "asm_so__client_id"."id")
WHERE (((("asm_so"."service_center_id" in ($1)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($2,$3)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($4)))
GROUP BY "asm_so"."client_id","asm_so__client_id"."display_name"
ORDER BY "asm_so__client_id"."display_name"
LIMIT $5
|
|
0 min
0.3%
|
384 ms
|
4
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,$18,$19)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($20,$21,$22,$23,$24)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($25)))
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 $26
|
|
0 min
0.2%
|
152 ms
|
9
odoo14
|
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_id" = $1) AND ("ir_attachment"."res_field" = $2)) ORDER BY "ir_attachment"."id" DESC
Details
CREATE INDEX CONCURRENTLY ON ir_attachment (res_id)
Rows: 399048
Row progression: 399048, 3
Row estimates
- res_id (=): 3
- res_field (=): 16040
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
224 ms
|
6
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
263 ms
|
5
odoo14
|
SELECT n.nspname AS schema, c.relname AS relation, CASE WHEN c.relkind = $1 THEN $2 ELSE $3 END AS type, pg_table_size(c.oid) AS size_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname NOT IN ($4, $5) AND n.nspname !~ $6 AND c.relkind IN ($7, $8) ORDER BY pg_table_size(c.oid) DESC, 2 ASC /*pghero*/
|
|
0 min
0.2%
|
164 ms
|
8
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)))
|
|
0 min
0.2%
|
261 ms
|
5
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
319 ms
|
4
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
36 ms
|
35
odoo14
|
SELECT "product_warranty".id FROM "product_warranty" WHERE ("product_warranty"."lot_id" in ($1)) ORDER BY "product_warranty"."id"
Details
CREATE INDEX CONCURRENTLY ON product_warranty (lot_id)
Rows: 68202
Row progression: 68202, 1
Row estimates
- lot_id (=): 1
- id (sort): 1
Existing indexes
- id PRIMARY
- message_main_attachment_id
|
|
0 min
0.2%
|
6 ms
|
200
odoo14
|
SELECT "asm_so"."id" as "id", "asm_so"."person_id" as "person_id" FROM "asm_so" WHERE (((("asm_so"."service_center_id" in ($1,$2,$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))) AND "asm_so".id IN ($22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005, $1006, $1007, $1008, $1009, $1010, $1011, $1012, $1013, $1014, $1015, $1016, $1017, $1018, $1019, $1020, $1021)
|
|
0 min
0.2%
|
135 ms
|
9
odoo14
|
SELECT min("asm_so".id) AS id, count("asm_so".id) AS "person_id_count" , sum("asm_so"."diff_last_activity_create") AS "diff_last_activity_create","asm_so"."person_id" as "person_id"
FROM "asm_so" LEFT JOIN "res_users" AS "asm_so__person_id" ON ("asm_so"."person_id" = "asm_so__person_id"."id") LEFT JOIN "res_partner" AS "asm_so__person_id__partner_id" ON ("asm_so__person_id"."partner_id" = "asm_so__person_id__partner_id"."id")
WHERE (("asm_so"."service_center_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,$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"."person_id","asm_so__person_id__partner_id"."name","asm_so__person_id"."login"
ORDER BY "asm_so__person_id__partner_id"."name" ,"asm_so__person_id"."login"
|
|
0 min
0.2%
|
288 ms
|
4
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE ("asm_sr"."name"::text ilike $1) AND (((("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,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($124,$125))) ORDER BY "asm_sr"."call_date" DESC LIMIT $126
|
|
0 min
0.2%
|
24 ms
|
46
odoo14
|
SELECT n.nspname AS schema, c.relname AS sequence, has_sequence_privilege(c.oid, $1) AS readable FROM pg_class c INNER JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = $2 AND n.nspname NOT IN ($3, $4) /*pghero*/
|
|
0 min
0.2%
|
112 ms
|
10
odoo14
|
SELECT "stock_production_lot".id FROM "stock_production_lot" WHERE (("stock_production_lot"."name" = $1) AND ("stock_production_lot"."product_id" = $2)) ORDER BY "stock_production_lot"."id"
Details
CREATE INDEX CONCURRENTLY ON stock_production_lot (name)
Rows: 131649
Row progression: 131649, 1
Row estimates
- name (=): 1
- product_id (=): 192
- id (sort): 1
Existing indexes
- id PRIMARY
- company_id
- message_main_attachment_id
|
|
0 min
0.2%
|
34 ms
|
32
odoo14
|
SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype
FROM pg_type as t
LEFT JOIN pg_range as r ON oid = rngtypid
WHERE
t.typname 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)
OR t.typtype IN ($41, $42, $43)
OR t.typinput = $44::regprocedure
OR t.typelem != $45
|
|
0 min
0.2%
|
1,092 ms
|
1
odoo14
|
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."state" = $1) AND ("account_move"."date" <= $2)) AND ("account_move"."auto_post" = $3)) ORDER BY "account_move"."date" DESC,"account_move"."name" DESC,"account_move"."id" DESC
Covered by index on (date)
Rows: 356998
Row progression: 356998, 35720
Row estimates
- date (<=): 35720
- state (=): 89250
- auto_post (=): 178499
- date (sort): 204
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
|
|
0 min
0.2%
|
218 ms
|
5
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: 229249
Row progression: 229249, 4493, 0
Row estimates
- product_type (=): 4493
- name (sort): 1
Existing indexes
- id PRIMARY
- message_main_attachment_id
- name
|
|
0 min
0.2%
|
270 ms
|
4
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
359 ms
|
3
odoo14
|
SELECT "ir_translation".id FROM "ir_translation" WHERE ((((("ir_translation"."module" 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)) AND ("ir_translation"."lang" = $111)) AND ("ir_translation"."comments"::text like $112)) AND "ir_translation"."value" IS NOT NULL) AND ("ir_translation"."value" != $113)) ORDER BY "ir_translation"."module"
|
|
0 min
0.2%
|
3 ms
|
362
odoo14
|
SELECT "res_partner"."id" as "id", "res_partner"."name" as "name", "res_partner"."display_name" as "display_name", "res_partner"."date" as "date", "res_partner"."title" as "title", "res_partner"."parent_id" as "parent_id", "res_partner"."ref" as "ref", "res_partner"."lang" as "lang", "res_partner"."tz" as "tz", "res_partner"."vat" as "vat", "res_partner"."website" as "website", "res_partner"."comment" as "comment", "res_partner"."credit_limit" as "credit_limit", "res_partner"."active" as "active", "res_partner"."employee" as "employee", "res_partner"."function" as "function", "res_partner"."type" as "type", "res_partner"."street" as "street", "res_partner"."street2" as "street2", "res_partner"."zip" as "zip", "res_partner"."city" as "city", "res_partner"."state_id" as "state_id", "res_partner"."country_id" as "country_id", "res_partner"."partner_latitude" as "partner_latitude", "res_partner"."partner_longitude" as "partner_longitude", "res_partner"."mobile" as "mobile", "res_partner"."is_company" as "is_company", "res_partner"."industry_id" as "industry_id", "res_partner"."company_id" as "company_id", "res_partner"."color" as "color", "res_partner"."partner_share" as "partner_share", "res_partner"."commercial_partner_id" as "commercial_partner_id", "res_partner"."commercial_company_name" as "commercial_company_name", "res_partner"."company_name" as "company_name", "res_partner"."city_id" as "city_id", "res_partner"."message_main_attachment_id" as "message_main_attachment_id", "res_partner"."email_normalized" as "email_normalized", "res_partner"."message_bounce" as "message_bounce", "res_partner"."email" as "email", "res_partner"."phone" as "phone", "res_partner"."user_id" as "user_id", "res_partner"."calendar_last_notif_ack" as "calendar_last_notif_ack", "res_partner"."phone_sanitized" as "phone_sanitized", "res_partner"."debit_limit" as "debit_limit", "res_partner"."last_time_entries_checked" as "last_time_entries_checked", "res_partner"."invoice_warn" as "invoice_warn", "res_partner"."invoice_warn_msg" as "invoice_warn_msg", "res_partner"."supplier_rank" as "supplier_rank", "res_partner"."customer_rank" as "customer_rank", "res_partner"."team_id" as "team_id", "res_partner"."picking_warn" as "picking_warn", "res_partner"."picking_warn_msg" as "picking_warn_msg", "res_partner"."partner_type" as "partner_type", "res_partner"."purchase_warn" as "purchase_warn", "res_partner"."purchase_warn_msg" as "purchase_warn_msg", "res_partner"."sale_warn" as "sale_warn", "res_partner"."sale_warn_msg" as "sale_warn_msg", "res_partner"."warning_stage" as "warning_stage", "res_partner"."blocking_stage" as "blocking_stage", "res_partner"."active_limit" as "active_limit", "res_partner"."followup_status" as "followup_status", "res_partner"."mobile2" as "mobile2", "res_partner"."create_uid" as "create_uid", "res_partner"."create_date" as "create_date", "res_partner"."write_uid" as "write_uid", "res_partner"."write_date" as "write_date" FROM "res_partner" WHERE "res_partner".id IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213)
Covered by index on (id)
Rows: 183155
Row progression: 183155, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- commercial_partner_id
- company_id
- date
- display_name
- message_main_attachment_id
- name
- parent_id
- ref
- vat
|
|
0 min
0.2%
|
126 ms
|
8
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)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($5))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.2%
|
246 ms
|
4
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
246 ms
|
4
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
136 ms
|
7
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
|
|
0 min
0.2%
|
157 ms
|
6
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE "asm_so"."client_id" IS NULL AND (((("asm_so"."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,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($123,$124))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $125
|
|
0 min
0.2%
|
24 ms
|
38
odoo14
|
SELECT "asm_so"."id" as "id", "asm_so"."sr_id" as "sr_id", "asm_so"."sr_state_id" as "sr_state_id", "asm_so"."sr_state_type" as "sr_state_type", "asm_so"."so_type" as "so_type", "asm_so"."so_state_id" as "so_state_id", "asm_so"."is_closed" as "is_closed", "asm_so"."is_locked" as "is_locked", "asm_so"."name" as "name", "asm_so"."person_id" as "person_id", "asm_so"."car_id" as "car_id", "asm_so"."client_id" as "client_id", "asm_so"."client_type" as "client_type", "asm_so"."contract_id" as "contract_id", "asm_so"."service_center_id" as "service_center_id", "asm_so"."sr_type" as "sr_type", "asm_so"."pref_date_start" as "pref_date_start", "asm_so"."pref_date_end" as "pref_date_end", "asm_so"."diagnose_id" as "diagnose_id", "asm_so"."diagnose_description" as "diagnose_description", "asm_so"."diagnose_warranty" as "diagnose_warranty", "asm_so"."final_diagnose_id" as "final_diagnose_id", "asm_so"."final_diagnose_description" as "final_diagnose_description", "asm_so"."final_diagnose_warranty" as "final_diagnose_warranty", "asm_so"."scheduled_date" as "scheduled_date", "asm_so"."product_type" as "product_type", "asm_so"."service_to_charge" as "service_to_charge", "asm_so"."product_id" as "product_id", "asm_so"."product_brand" as "product_brand", "asm_so"."product_serial_id" as "product_serial_id", "asm_so"."product_serial_warranty_id" as "product_serial_warranty_id", "asm_so"."product_serial_warranty" as "product_serial_warranty", "asm_so"."current_product_serial_warranty" as "current_product_serial_warranty", "asm_so"."pricelist_id" as "pricelist_id", "asm_so"."invoice_count" as "invoice_count", "asm_so"."delivery_picking_id" as "delivery_picking_id", "asm_so"."pull_type" as "pull_type", "asm_so"."reg_warranty_id" as "reg_warranty_id", "asm_so"."reg_serial" as "reg_serial", "asm_so"."error_return" as "error_return", "asm_so"."error_warranty" as "error_warranty", "asm_so"."last_activity_time" as "last_activity_time", "asm_so"."diff_last_activity_create" as "diff_last_activity_create", "asm_so"."work_description" as "work_description", "asm_so"."related_soo_service_center_id" as "related_soo_service_center_id", "asm_so"."amount_paid" as "amount_paid", "asm_so"."invoice_amounts" as "invoice_amounts", "asm_so"."req_qty" as "req_qty", "asm_so"."waiting_qty" as "waiting_qty", "asm_so"."cancelled_qty" as "cancelled_qty", "asm_so"."rec_qty" as "rec_qty", "asm_so"."diff_qty" as "diff_qty", "asm_so"."installed_qty" as "installed_qty", "asm_so"."to_return_qty" as "to_return_qty", "asm_so"."returned_qty" as "returned_qty", "asm_so"."damaged_qty" as "damaged_qty", "asm_so"."rec_damaged_qty" as "rec_damaged_qty", "asm_so"."not_rec_damaged_qty" as "not_rec_damaged_qty", "asm_so"."req_cost" as "req_cost", "asm_so"."waiting_cost" as "waiting_cost", "asm_so"."cancelled_cost" as "cancelled_cost", "asm_so"."rec_cost" as "rec_cost", "asm_so"."diff_cost" as "diff_cost", "asm_so"."to_return_cost" as "to_return_cost", "asm_so"."returned_cost" as "returned_cost", "asm_so"."damaged_cost" as "damaged_cost", "asm_so"."rec_damaged_cost" as "rec_damaged_cost", "asm_so"."not_rec_damaged_cost" as "not_rec_damaged_cost", "asm_so"."installed_cost" as "installed_cost", "asm_so"."installed_price" as "installed_price", "asm_so"."installed_price_tax_exl" as "installed_price_tax_exl", "asm_so"."service_qty" as "service_qty", "asm_so"."service_price" as "service_price", "asm_so"."order_total_price" as "order_total_price", "asm_so"."message_main_attachment_id" as "message_main_attachment_id", "asm_so"."create_uid" as "create_uid", "asm_so"."create_date" as "create_date", "asm_so"."write_uid" as "write_uid", "asm_so"."write_date" as "write_date" FROM "asm_so" WHERE (((("asm_so"."service_center_id" in ($1,$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))) AND "asm_so".id IN ($18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $120, $121, $122, $123, $124, $125, $126, $127, $128, $129, $130, $131, $132, $133, $134, $135, $136, $137, $138, $139, $140, $141, $142, $143, $144, $145, $146, $147, $148, $149, $150, $151, $152, $153, $154, $155, $156, $157, $158, $159, $160, $161, $162, $163, $164, $165, $166, $167, $168, $169, $170, $171, $172, $173, $174, $175, $176, $177, $178, $179, $180, $181, $182, $183, $184, $185, $186, $187, $188, $189, $190, $191, $192, $193, $194, $195, $196, $197, $198, $199, $200, $201, $202, $203, $204, $205, $206, $207, $208, $209, $210, $211, $212, $213, $214, $215, $216, $217, $218, $219, $220, $221, $222, $223, $224, $225, $226, $227, $228, $229, $230, $231, $232, $233, $234, $235, $236, $237, $238, $239, $240, $241, $242, $243, $244, $245, $246, $247, $248, $249, $250, $251, $252, $253, $254, $255, $256, $257, $258, $259, $260, $261, $262, $263, $264, $265, $266, $267, $268, $269, $270, $271, $272, $273, $274, $275, $276, $277, $278, $279, $280, $281, $282, $283, $284, $285, $286, $287, $288, $289, $290, $291, $292, $293, $294, $295, $296, $297, $298, $299, $300, $301, $302, $303, $304, $305, $306, $307, $308, $309, $310, $311, $312, $313, $314, $315, $316, $317, $318, $319, $320, $321, $322, $323, $324, $325, $326, $327, $328, $329, $330, $331, $332, $333, $334, $335, $336, $337, $338, $339, $340, $341, $342, $343, $344, $345, $346, $347, $348, $349, $350, $351, $352, $353, $354, $355, $356, $357, $358, $359, $360, $361, $362, $363, $364, $365, $366, $367, $368, $369, $370, $371, $372, $373, $374, $375, $376, $377, $378, $379, $380, $381, $382, $383, $384, $385, $386, $387, $388, $389, $390, $391, $392, $393, $394, $395, $396, $397, $398, $399, $400, $401, $402, $403, $404, $405, $406, $407, $408, $409, $410, $411, $412, $413, $414, $415, $416, $417, $418, $419, $420, $421, $422, $423, $424, $425, $426, $427, $428, $429, $430, $431, $432, $433, $434, $435, $436, $437, $438, $439, $440, $441, $442, $443, $444, $445, $446, $447, $448, $449, $450, $451, $452, $453, $454, $455, $456, $457, $458, $459, $460, $461, $462, $463, $464, $465, $466, $467, $468, $469, $470, $471, $472, $473, $474, $475, $476, $477, $478, $479, $480, $481, $482, $483, $484, $485, $486, $487, $488, $489, $490, $491, $492, $493, $494, $495, $496, $497, $498, $499, $500, $501, $502, $503, $504, $505, $506, $507, $508, $509, $510, $511, $512, $513, $514, $515, $516, $517, $518, $519, $520, $521, $522, $523, $524, $525, $526, $527, $528, $529, $530, $531, $532, $533, $534, $535, $536, $537, $538, $539, $540, $541, $542, $543, $544, $545, $546, $547, $548, $549, $550, $551, $552, $553, $554, $555, $556, $557, $558, $559, $560, $561, $562, $563, $564, $565, $566, $567, $568, $569, $570, $571, $572, $573, $574, $575, $576, $577, $578, $579, $580, $581, $582, $583, $584, $585, $586, $587, $588, $589, $590, $591, $592, $593, $594, $595, $596, $597, $598, $599, $600, $601, $602, $603, $604, $605, $606, $607, $608, $609, $610, $611, $612, $613, $614, $615, $616, $617, $618, $619, $620, $621, $622, $623, $624, $625, $626, $627, $628, $629, $630, $631, $632, $633, $634, $635, $636, $637, $638, $639, $640, $641, $642, $643, $644, $645, $646, $647, $648, $649, $650, $651, $652, $653, $654, $655, $656, $657, $658, $659, $660, $661, $662, $663, $664, $665, $666, $667, $668, $669, $670, $671, $672, $673, $674, $675, $676, $677, $678, $679, $680, $681, $682, $683, $684, $685, $686, $687, $688, $689, $690, $691, $692, $693, $694, $695, $696, $697, $698, $699, $700, $701, $702, $703, $704, $705, $706, $707, $708, $709, $710, $711, $712, $713, $714, $715, $716, $717, $718, $719, $720, $721, $722, $723, $724, $725, $726, $727, $728, $729, $730, $731, $732, $733, $734, $735, $736, $737, $738, $739, $740, $741, $742, $743, $744, $745, $746, $747, $748, $749, $750, $751, $752, $753, $754, $755, $756, $757, $758, $759, $760, $761, $762, $763, $764, $765, $766, $767, $768, $769, $770, $771, $772, $773, $774, $775, $776, $777, $778, $779, $780, $781, $782, $783, $784, $785, $786, $787, $788, $789, $790, $791, $792, $793, $794, $795, $796, $797, $798, $799, $800, $801, $802, $803, $804, $805, $806, $807, $808, $809, $810, $811, $812, $813, $814, $815, $816, $817, $818, $819, $820, $821, $822, $823, $824, $825, $826, $827, $828, $829, $830, $831, $832, $833, $834, $835, $836, $837, $838, $839, $840, $841, $842, $843, $844, $845, $846, $847, $848, $849, $850, $851, $852, $853, $854, $855, $856, $857, $858, $859, $860, $861, $862, $863, $864, $865, $866, $867, $868, $869, $870, $871, $872, $873, $874, $875, $876, $877, $878, $879, $880, $881, $882, $883, $884, $885, $886, $887, $888, $889, $890, $891, $892, $893, $894, $895, $896, $897, $898, $899, $900, $901, $902, $903, $904, $905, $906, $907, $908, $909, $910, $911, $912, $913, $914, $915, $916, $917, $918, $919, $920, $921, $922, $923, $924, $925, $926, $927, $928, $929, $930, $931, $932, $933, $934, $935, $936, $937, $938, $939, $940, $941, $942, $943, $944, $945, $946, $947, $948, $949, $950, $951, $952, $953, $954, $955, $956, $957, $958, $959, $960, $961, $962, $963, $964, $965, $966, $967, $968, $969, $970, $971, $972, $973, $974, $975, $976, $977, $978, $979, $980, $981, $982, $983, $984, $985, $986, $987, $988, $989, $990, $991, $992, $993, $994, $995, $996, $997, $998, $999, $1000, $1001, $1002, $1003, $1004, $1005, $1006, $1007, $1008, $1009, $1010, $1011, $1012, $1013, $1014, $1015, $1016, $1017)
|
|
0 min
0.2%
|
185 ms
|
5
odoo14
|
SELECT "product_product".id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = $1 AND "product_product__product_tmpl_id__name"."name" = $2 AND "product_product__product_tmpl_id__name"."lang" = $3 AND "product_product__product_tmpl_id__name"."value" != $4) WHERE ((("product_product"."active" = $5) AND "product_product__product_tmpl_id"."scrap_for_template" IS NULL ) AND ("product_product__product_tmpl_id"."is_product" = $6)) AND (("product_product__product_tmpl_id"."company_id" in ($7)) OR "product_product__product_tmpl_id"."company_id" IS NULL ) ORDER BY "product_product"."default_code" ,COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name") ,"product_product"."id" LIMIT $8
|
|
0 min
0.2%
|
132 ms
|
7
odoo14
|
SELECT "asm_sr".id FROM "asm_sr" WHERE ("asm_sr"."product_serial_warranty_id" in ($1)) ORDER BY "asm_sr"."id"
Details
CREATE INDEX CONCURRENTLY ON asm_sr (product_serial_warranty_id)
Rows: 229249
Row progression: 229249, 2
Row estimates
- product_serial_warranty_id (=): 2
- id (sort): 1
Existing indexes
- id PRIMARY
- message_main_attachment_id
- name
|
|
0 min
0.2%
|
1 ms
|
1,632
odoo14
|
SELECT res_groups_users_rel.uid, res_groups_users_rel.gid FROM res_groups_users_rel, "res_groups" LEFT JOIN "ir_translation" AS "res_groups__name" ON ("res_groups"."id" = "res_groups__name"."res_id" AND "res_groups__name"."type" = $1 AND "res_groups__name"."name" = $2 AND "res_groups__name"."lang" = $3 AND "res_groups__name"."value" != $4)
WHERE $5=$6 AND res_groups_users_rel.uid IN ($7) AND res_groups_users_rel.gid = res_groups.id
ORDER BY COALESCE("res_groups__name"."value", "res_groups"."name") OFFSET $8
|
|
0 min
0.2%
|
219 ms
|
4
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.2%
|
435 ms
|
2
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
|
|
0 min
0.1%
|
844 ms
|
1
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,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107)) OR "asm_sr"."service_center_id" IS NULL ) AND (("asm_sr"."contract_id" in ($108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122)) OR "asm_sr"."contract_id" IS NULL )) AND ("asm_sr"."client_type" in ($123,$124))) ORDER BY "asm_sr"."name" DESC,"asm_sr"."id" DESC
|
|
0 min
0.1%
|
168 ms
|
5
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."person_id" = $1) AND (("asm_so"."service_center_id" = $2) AND ("asm_so"."so_state_id" = $3))) AND (((("asm_so"."service_center_id" in ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($19,$20,$21,$22,$23)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($24))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $25
|
|
0 min
0.1%
|
3 ms
|
251
odoo14
|
INSERT INTO "mail_message" ("id", "create_uid", "create_date", "write_uid", "write_date", "add_sign", "author_id", "body", "date", "email_from", "is_internal", "message_id", "message_type", "model", "record_name", "reply_to", "res_id", "subject", "subtype_id") VALUES (nextval($1), $2, (now() at time zone $3), $4, (now() at time zone $5), $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) RETURNING id
|
|
0 min
0.1%
|
17 ms
|
46
odoo14
|
SELECT last_value FROM "public"."0res_partner_1_id_seq" UNION ALL SELECT last_value FROM "public"."account_account_id_seq" UNION ALL SELECT last_value FROM "public"."account_account_tag_id_seq" UNION ALL SELECT last_value FROM "public"."account_account_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_account_type_id_seq" UNION ALL SELECT last_value FROM "public"."account_aged_trial_balance_id_seq" UNION ALL SELECT last_value FROM "public"."account_analytic_account_id_seq" UNION ALL SELECT last_value FROM "public"."account_analytic_default_id_seq" UNION ALL SELECT last_value FROM "public"."account_analytic_distribution_id_seq" UNION ALL SELECT last_value FROM "public"."account_analytic_group_id_seq" UNION ALL SELECT last_value FROM "public"."account_analytic_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_analytic_tag_id_seq" UNION ALL SELECT last_value FROM "public"."account_asset_asset_id_seq" UNION ALL SELECT last_value FROM "public"."account_asset_category_id_seq" UNION ALL SELECT last_value FROM "public"."account_asset_depreciation_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_automatic_entry_wizard_id_seq" UNION ALL SELECT last_value FROM "public"."account_balance_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_bank_book_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_bank_statement_id_seq" UNION ALL SELECT last_value FROM "public"."account_bank_statement_cashbox_id_seq" UNION ALL SELECT last_value FROM "public"."account_bank_statement_closebalance_id_seq" UNION ALL SELECT last_value FROM "public"."account_bank_statement_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_budget_post_id_seq" UNION ALL SELECT last_value FROM "public"."account_cash_book_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_cash_rounding_id_seq" UNION ALL SELECT last_value FROM "public"."account_cashbox_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_chart_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_common_account_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_common_journal_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_common_partner_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_common_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_day_book_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_financial_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_financial_year_op_id_seq" UNION ALL SELECT last_value FROM "public"."account_fiscal_position_id_seq" UNION ALL SELECT last_value FROM "public"."account_fiscal_position_account_id_seq" UNION ALL SELECT last_value FROM "public"."account_fiscal_position_account_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_fiscal_position_tax_id_seq" UNION ALL SELECT last_value FROM "public"."account_fiscal_position_tax_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_fiscal_position_template_id_seq" UNION ALL SELECT last_value FROM "public"."product_category_attribute_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_followup_id_seq" UNION ALL SELECT last_value FROM "public"."account_full_reconcile_id_seq" UNION ALL SELECT last_value FROM "public"."account_group_id_seq" UNION ALL SELECT last_value FROM "public"."account_group_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_incoterms_id_seq" UNION ALL SELECT last_value FROM "public"."account_invoice_send_id_seq" UNION ALL SELECT last_value FROM "public"."account_journal_id_seq" UNION ALL SELECT last_value FROM "public"."account_journal_group_id_seq" UNION ALL SELECT last_value FROM "public"."account_lock_date_id_seq" UNION ALL SELECT last_value FROM "public"."account_move_id_seq" UNION ALL SELECT last_value FROM "public"."account_move_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_move_reversal_id_seq" UNION ALL SELECT last_value FROM "public"."account_partial_reconcile_id_seq" UNION ALL SELECT last_value FROM "public"."account_payment_id_seq" UNION ALL SELECT last_value FROM "public"."account_payment_method_id_seq" UNION ALL SELECT last_value FROM "public"."account_payment_register_id_seq" UNION ALL SELECT last_value FROM "public"."account_payment_term_id_seq" UNION ALL SELECT last_value FROM "public"."account_payment_term_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_print_journal_id_seq" UNION ALL SELECT last_value FROM "public"."account_reconcile_model_id_seq" UNION ALL SELECT last_value FROM "public"."account_reconcile_model_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_reconcile_model_line_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_reconcile_model_partner_mapping_id_seq" UNION ALL SELECT last_value FROM "public"."account_reconcile_model_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_recurring_entries_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_recurring_payments_id_seq" UNION ALL SELECT last_value FROM "public"."account_report_general_ledger_id_seq" UNION ALL SELECT last_value FROM "public"."account_report_partner_ledger_id_seq" UNION ALL SELECT last_value FROM "public"."account_resequence_wizard_id_seq" UNION ALL SELECT last_value FROM "public"."account_setup_bank_manual_config_id_seq" UNION ALL SELECT last_value FROM "public"."account_tax_id_seq" UNION ALL SELECT last_value FROM "public"."account_tax_group_id_seq" UNION ALL SELECT last_value FROM "public"."account_tax_repartition_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_tax_repartition_line_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_tax_report_id_seq" UNION ALL SELECT last_value FROM "public"."account_tax_report_line_id_seq" UNION ALL SELECT last_value FROM "public"."account_tax_template_id_seq" UNION ALL SELECT last_value FROM "public"."account_tour_upload_bill_id_seq" UNION ALL SELECT last_value FROM "public"."account_tour_upload_bill_email_confirm_id_seq" UNION ALL SELECT last_value FROM "public"."account_unreconcile_id_seq" UNION ALL SELECT last_value FROM "public"."asm_activity_id_seq" UNION ALL SELECT last_value FROM "public"."asm_activity_action_id_seq" UNION ALL SELECT last_value FROM "public"."asm_activity_line_id_seq" UNION ALL SELECT last_value FROM "public"."asm_activity_type_id_seq" UNION ALL SELECT last_value FROM "public"."asm_apply_on_id_seq" UNION ALL SELECT last_value FROM "public"."asm_call_res_id_seq" UNION ALL SELECT last_value FROM "public"."asm_car_id_seq" UNION ALL SELECT last_value FROM "public"."asm_cause_id_seq" UNION ALL SELECT last_value FROM "public"."asm_cause_group_id_seq" UNION ALL SELECT last_value FROM "public"."asm_contract_id_seq" UNION ALL SELECT last_value FROM "public"."asm_customer_complain_id_seq" UNION ALL SELECT last_value FROM "public"."asm_diagnose_id_seq" UNION ALL SELECT last_value FROM "public"."asm_diagnose_group_id_seq" UNION ALL SELECT last_value FROM "public"."asm_enquiry_id_seq" UNION ALL SELECT last_value FROM "public"."asm_enquiry_help_wizard_id_seq" UNION ALL SELECT last_value FROM "public"."asm_log_activity_id_seq" UNION ALL SELECT last_value FROM "public"."asm_money_collect_id_seq" UNION ALL SELECT last_value FROM "public"."asm_payment_id_seq" UNION ALL SELECT last_value FROM "public"."asm_payment_action_id_seq" UNION ALL SELECT last_value FROM "public"."asm_payment_reason_id_seq" UNION ALL SELECT last_value FROM "public"."asm_payment_reason_group_id_seq" UNION ALL SELECT last_value FROM "public"."asm_payment_wizard_id_seq" UNION ALL SELECT last_value FROM "public"."asm_product_type_id_seq" UNION ALL SELECT last_value FROM "public"."asm_products_id_seq" UNION ALL SELECT last_value FROM "public"."asm_products_left_id_seq" UNION ALL SELECT last_value FROM "public"."asm_products_trans_id_seq" UNION ALL SELECT last_value FROM "public"."asm_products_used_id_seq" UNION ALL SELECT last_value FROM "public"."asm_security_group_id_seq" UNION ALL SELECT last_value FROM "public"."asm_service_center_id_seq" UNION ALL SELECT last_value FROM "public"."asm_signature_id_seq" UNION ALL SELECT last_value FROM "public"."asm_so_id_seq" UNION ALL SELECT last_value FROM "public"."asm_sr_id_seq" UNION ALL SELECT last_value FROM "public"."asm_state_id_seq" UNION ALL SELECT last_value FROM "public"."asm_team_id_seq" UNION ALL SELECT last_value FROM "public"."asm_warranty_reg_id_seq" UNION ALL SELECT last_value FROM "public"."asm_worker_deduction_id_seq" UNION ALL SELECT last_value FROM "public"."asm_worker_inventory_id_seq" UNION ALL SELECT last_value FROM "public"."asset_depreciation_confirmation_wizard_id_seq" UNION ALL SELECT last_value FROM "public"."asset_modify_id_seq" UNION ALL SELECT last_value FROM "public"."auth_totp_wizard_id_seq" UNION ALL SELECT last_value FROM "public"."barcode_nomenclature_id_seq" UNION ALL SELECT last_value FROM "public"."barcode_rule_id_seq" UNION ALL SELECT last_value FROM "public"."base_document_layout_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_import_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_mapping_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_char_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_char_noreadonly_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_char_readonly_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_char_required_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_char_states_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_char_stillreadonly_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_complex_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_float_id_seq" UNION ALL SELECT last_value FROM "public"."base_import_tests_models_m2o_id_seq" UNION ALL SE
|
|
0 min
0.1%
|
253 ms
|
3
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."client_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)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($5))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC LIMIT $6
|
|
0 min
0.1%
|
4 ms
|
180
odoo14
|
SELECT "asm_sr"."id" as "id", "asm_sr"."product_type" as "product_type" FROM "asm_sr" WHERE "asm_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)
Covered by index on (id)
Rows: 229249
Row progression: 229249, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- message_main_attachment_id
- name
|
|
0 min
0.1%
|
244 ms
|
3
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: 399048
Row progression: 399048, 2
Row estimates
- activity_line_id (=): 2
- res_field (null): 270727
- id (sort): 1
Existing indexes
- id PRIMARY
- checksum
- original_id
- res_model, res_id
- so_id
- url
|
|
0 min
0.1%
|
244 ms
|
3
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE ("asm_so"."sr_id" in ($1,$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,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$109)) OR "asm_so"."service_center_id" IS NULL ) AND (("asm_so"."contract_id" in ($110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123,$124)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($125,$126))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|
|
0 min
0.1%
|
179 ms
|
4
odoo14
|
SELECT "asm_so".id FROM "asm_so" WHERE (("asm_so"."so_state_id" = $1) AND ("asm_so"."client_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)) OR "asm_so"."contract_id" IS NULL )) AND ("asm_so"."so_type" in ($6))) ORDER BY "asm_so"."name" DESC,"asm_so"."id" DESC
|