How to get executed queries

0
Hi all, Is it possible to know what exact query has been executed in Mendix? if so, how? I have tried it by using lognode “DataStorage_QueryHandring”, but it seems not correct….  
asked
1 answers
0

From mendix docs TRACE level logging of one of these depending on what you need should do it

DataStorage_QueryHandling

Logsmessages related to the queries that are being executed.

QueryParser

Logs messages related to the parsing or interpretation of XPath and OQL queries.

DataStorage_QueryPlan

Queryexecution plan information for installations (currently only supported for PostgreSQL databases)

 

If you are running postgres and have access to the database I found it easier to just turn on logging in postgres

 

Also in mendix cloud LogMinDurationQuery custom aetting can be used to log queries longer than X seconds

 

answered