Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 81138

Equal environments give different query results

$
0
0

I have deployed the same build of een app in a production and acceptance (on-premise) environment.
In both environments the application behaves differently.
When I login in both environments as a user with the same userroles on an equal dataset I get different results in a standard datagrid.
To analyse this issue I retrieved the executed SQL queries from both logs.
What I see is that the executed SQL differs which explains the difference in results.

Questions is:
What can be the reason(s) for the different queries

Example queries

Acceptance
SELECT "loyalty$loyaltytransactie"."id", 
"loyalty$loyaltytransactie"."transactiedatum", 
"loyalty$loyaltytransactie"."_ccissuepoints", 
"loyalty$loyaltytransactie"."_ccredeempoints", 
"loyalty$loyaltytransactie"."transactiebedrag", 
CASE WHEN TRUE THEN TRUE END AS "__sec_9"
 FROM "loyalty$loyaltytransactie" WHERE ("loyalty$loyaltytransactie"."id" IN (SELECT "a6loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltytransactieid"
 FROM "loyalty$loyaltytransactie_loyaltyschema" "a6loyalty$loyaltytransactie_loyaltyschema"
 INNER JOIN "loyalty$loyaltyschema_loyaltyprogramma" "a7loyalty$loyaltyschema_loyaltyprogramma" ON "a7loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyschemaid" = "a6loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltyschemaid"
 INNER JOIN "loyalty$loyaltyprogramma_helper_participant" "a8loyalty$loyaltyprogramma_helper_participant" ON "a8loyalty$loyaltyprogramma_helper_participant"."loyalty$loyaltyprogrammaid" = "a7loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyprogrammaid"
 INNER JOIN "usagemanagement$employee_organization" "c5usagemanagement$employee_organization" ON "c5usagemanagement$employee_organization"."usagemanagement$organizationid" = "a8loyalty$loyaltyprogramma_helper_participant"."registration$participantid"
 WHERE "c5usagemanagement$employee_organization"."usagemanagement$employeeid" = 3377699720529275))
 ORDER BY "loyalty$loyaltytransactie"."transactiedatum" DESC, 
"loyalty$loyaltytransactie"."id" ASC LIMIT 18

Production:
SELECT "loyalty$loyaltytransactie"."id", 
"loyalty$loyaltytransactie"."transactiedatum", 
"loyalty$loyaltytransactie"."_ccissuepoints", 
"loyalty$loyaltytransactie"."_ccredeempoints", 
"loyalty$loyaltytransactie"."transactiebedrag", 
CASE WHEN TRUE THEN TRUE END AS "__sec_20"
 FROM "loyalty$loyaltytransactie"
 WHERE "loyalty$loyaltytransactie"."id" IN (SELECT "a1loyalty$loyaltytransactie_terminal"."loyalty$loyaltytransactieid"
 FROM "loyalty$loyaltytransactie_terminal" "a1loyalty$loyaltytransactie_terminal"
 INNER JOIN "registration$terminal" ON "registration$terminal"."id" = "a1loyalty$loyaltytransactie_terminal"."registration$terminalid"
 INNER JOIN "loyalty$loyaltytransactie_loyaltyschema" "a3loyalty$loyaltytransactie_loyaltyschema" ON "a3loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltytransactieid" = "a1loyalty$loyaltytransactie_terminal"."loyalty$loyaltytransactieid"
 INNER JOIN "loyalty$loyaltyschema_loyaltyprogramma" "a4loyalty$loyaltyschema_loyaltyprogramma" ON "a4loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyschemaid" = "a3loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltyschemaid"
 INNER JOIN "loyalty$loyaltyprogramma_helper_participant" "a5loyalty$loyaltyprogramma_helper_participant" ON "a5loyalty$loyaltyprogramma_helper_participant"."loyalty$loyaltyprogrammaid" = "a4loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyprogrammaid"
 INNER JOIN "usagemanagement$employee_organization" "c2usagemanagement$employee_organization" ON "c2usagemanagement$employee_organization"."usagemanagement$organizationid" = "a5loyalty$loyaltyprogramma_helper_participant"."registration$participantid"
 WHERE ("registration$terminal"."id" IN (SELECT "a7registration$terminals_participant"."registration$terminalid"
 FROM "registration$terminals_participant" "a7registration$terminals_participant"
 INNER JOIN "usagemanagement$employee_organization" "c6usagemanagement$employee_organization" ON "c6usagemanagement$employee_organization"."usagemanagement$organizationid" = "a7registration$terminals_participant"."registration$participantid"
 WHERE "a7registration$terminals_participant"."registration$terminalid" = "registration$terminal"."id" AND "c6usagemanagement$employee_organization"."usagemanagement$employeeid" = 63050394783188966)) AND "registration$terminal"."omschrijving" = ? AND ((("c2usagemanagement$employee_organization"."usagemanagement$employeeid" = 63050394783188966))))
 ORDER BY "loyalty$loyaltytransactie"."transactiedatum" DESC, 
"loyalty$loyaltytransactie"."id" ASC LIMIT 18


Viewing all articles
Browse latest Browse all 81138

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>