Aggregate queries, disable or limit fetching data

Aggregate queries, disable or limit fetching data

  
In the aggregate queries, is their a way to disable "fetching data" or limit the number of records it retrieves from the database?
 
We have tables with a few million records and with the aggregate queries it's almost impossible do view/change/ test the aggregate queries because service studio basically stops running.
 
Many thanks.
Hi Helio,

Do you have an Integer literal as MaxRecords set for those queries? It is taken into account for the number of lines to display in preview, and the current Service Studio is not establishing an upper limit. So if you have a MaxRecords of 10000, the editor will try to fetch 10000 records.

Another source of slowness might be having a large number of columns in preview. Hiding those which you are not looking at will help.

With that said, currently you have no direct way of completely disabling preview data, but you have some workarounds:
  • Temporarily set the MaxRecords of the Aggregate to "0" or some other (small) integer literal.
  • Temporarily add a Filter to your query that is never true.
  • Create an error situation inside the Aggregate (e.g. create an empty filter). Preview data is only refreshed when the Aggregate is in a valid state.
If you really feel the need to, I'd recommend the last one, as there's no chance you'll forget to resolve the error before being able to publish (but you might forget to remove a filter, or reverting MaxRecords).

Regards,
Paulo Ferreira