Subject Re: Limit the query via time or number of records
Author kokok_kokok
I cannot use the "SELECT FIRST 1000" way because in some scenarios, the user can write himself the SQL. In the other side, limiting the number of records can control the data sent, but not the time used by Firebird to retrieve the data.

I would like to define in some place, maybe the connection, Fb configuration, ...? the maximum time that the Firebird can spend in one SQL query.

For example, the SQL motor of Windows Azure (Microsoft Cloud) simply finishes any SQL consult that exceeds a time or a number of records. It avoid that some few users frozen the server.

I would like to do some similar thing.

Another way, if via declaration is not possible, is to use a thread that finishes the Firebird process or cancels the transaction, but I prefer to avoid it.