Performance issue in SQL queries
Hi All,
I have developed a utility to get the transaction data from POS in to a .csv file using Java and SQL queries.
This jar is taking 5 hrs in production to execute and generate the file, whereas in local environment its taking 20 min.
I figured out that this is an indexes problem, but due to some reasons creating indexes on Production is not possible, so I am trying to optimize my queries.
Please help me, to optimize and I have written to my best.
Please find one the query below.
SELECT DISTINCT trn.ID_STR_RT,
trn.ID_WS,