Re: Any Way to Limit Number of Rows Returned?
Posted in 1996
> Any of you Informix gurus know if there is any way to limit the number
> of rows that a query can return in Informix 7.x and up. What I would
> like to do is to be able to prevent the 'killer query' from running
> and returning a trillion rows and consuming all of the resources. I
> know you have the LXHWM and LXEHWM plus the PDQ parameters if you have
> PDQ turned on, but is there any other way to stop a killer query from
> running before it starts or at least limit the number of rows returned
> such as setting some type of global parameter?
>
> Anixously waiting for some answers....thanks in advance for any info.
Erm. Well, if you're in 4GL or whatever, you can exit your loop
programmatically, or else in OnLine 8.x (XPS) you can say something like
SELECT FIRST 20 *
FROM tablea
WHERE....
*I* think it would be nice if this feature could be put into all versions of
the engine, but I don't know if Informix ever will... :-/
HTH.
--
Ciao,
Billy
+------------------------------------------------------------------------------+
| Billy Wheeler Junior Programmer / Director The West Solutions Group |
+------------------------------------------------------------------------------+
| (E) billy@west.co.za (U) http://www.west.co.za/billy.html |
+------------------------------------------------------------------------------+
| WARNING: sending me junk-email will be interpreted as granting permission to |
| bomb your offices and machine-gun your children. |
+------------------------------------------------------------------------------+