Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
John Shepherd — — source: Informix-list mailing list archive (1991-1998)
Greetings
When I DECLARE a fairly trivial cursor to SELECT rows from a large table
(where the SELECT uses indexes) how "expensive" is it in terms of
processing time ? eg are query plans updated/created etc when I execute
the declare ? Regards,
John
↪ replying to John Shepherd
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
John Shepherd wrote:
>
> Greetings
> When I DECLARE a fairly trivial cursor to SELECT rows from a large table
> (where the SELECT uses indexes) how "expensive" is it in terms of
Not expensive at all. Besides there is not other choice, if you want data
you have to declare a cursor!
> processing time ? eg are query plans updated/created etc when I execute
> the declare ?
Query plans are developed when a statements is PREPARED. If you skip the
PREPARE step and DECLARE a CURSOR on an SQL string an implied PREPARE is
executed for you at that time. If the developed query plan is no longer
valid, for example because the table has been altered or UPDATE STATS has
been run and the stats have significantly changed, an OPEN of the cursor
will return sqlcode -710.
Art S. Kagel
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.