How to avoid executing queries [message #1822941] |
Tue, 17 March 2020 07:52 |
Oscar Utrilla Messages: 1 Registered: March 2020 |
Junior Member |
|
|
I have a main table with thousands of results.
For each record I have 6 subtables with complex queries that have a significant cost, but their visibility depends on the values obtained. Approximately, it is displayed only 5% of the time.
All this supposes too long execution times.
To improve performance, in the beforeOpen() of each subquery, if it is not necessary, i change the query for a simpler one with minimal cost, but the query continues to run and the cost remains high.
I cannot drop the subtables because there are times that they are displayed and others that are not.
Is there a way to avoid executing the query in cases that are not necessary?
tnks
Oscar
|
|
|
Powered by
FUDForum. Page generated in 0.04250 seconds