Best Practices to Limit Query Size

I have a use case where a user must make 3 selections before any results are shown. If this restriction is not followed then the query result is enormous, is too large for spice, and would take too long with a direct query to MS SQL. I have the 3 selection requirement working in Qlik by way of custom data handling but need to migrate this to QuickSight. What is the best way to do this in QuickSight?

I was thinking the first step is to put each of the three selections into a spice dataset so they load quickly. But then I need some check that once and only once all three selections are made a SQL query is run to fetch the results from the DB. Suggestions on the best way(s) to implement this?

Hi @quicksightenthusiast,
what exactly is the issue? that the user has to select 3 filter or the amount of data?

Do i get it right?
You want 3 SPICE datasets as a base, which the user can use to do the selection/filtering?
After that you want to run the Direct Query with given filter?


The issue is I want a 4th dataset queried (inner joined) if and only if 3 selections are made (or changed) against 3 individual datasets. Otherwise the scatter plot I’m generating will have tens of millions of points rendering it useless, assuming it ever loads to begin with after such a massive join query to the DB finished.

Can I restrict QuickSight from loading/rendering/pulling (whatever the right term is) the 4th dataset until mandatory selections are made?

Hi @quicksightenthusiast,
maybe you can use the filter in the query for the 4th dataset and as long as the parameter are not set right the query result will be 0/null.