Limiting Designer Query Sizes

Is there a way to limit number of rows that get returned from any query when in designer? Other than just normal db best practices?

I have a large database table, and a contractor didn't put a 'Top' condition in and it was crashing the gateway because of the heap size.

No.

image

That's purely for named queries invoked from bindings. Scripted queries, query browser queries with the 1000 row limit checkbox turned off, etc, will all get everything they are told to.

To fix it, disable the database connection on the gateway.
Open the page in designer and adjust the query.
Enable the database connection,

Don't ask how I know this :stuck_out_tongue:

5 Likes

Yikes, this is sounding like a bug.

I'm sure it was a while back, but can you remember any more details @MMaynard that will help us track this down? e.g. named query? query binding? approximate ignition version? the specific swear words you said? :stuck_out_tongue_winking_eye:

2 Likes

IF I remember correctly it was during a development and it was on a very large SQL Table(a few million rows)
When you went to try and open the window it was trying to load the entire table.
So we disabled the db connection, opened the window, limited the select on the table and saved.
Then re-enabled the DB connection.

2 Likes

Ah, gotcha. I can see that happening. I was thinking this was an issue with the change not taking effect if you didn't pause the DB connection, which would be very, very bad.

Could you use one of these (type, userAgent) to create a limit Claus in a if statement or similar?

image