Обсуждение: AW: LIMIT in DECLARE CURSOR: request for comments

Поиск
Список
Период
Сортировка

AW: LIMIT in DECLARE CURSOR: request for comments

От
Zeugswetter Andreas SB
Дата:
> >So I think if you want to make optimization decisions based on cursors
> >being used versus a "normal" select, then the only thing you can safely
> >take into account is the network roundtrip and client processing per
> >fetch, but that might be as random as anything.
> 
> Which is why I like the client being able to ask the 
> optimizer for certain kinds of solutions *explicitly*.

Yes, something like:set optimization to [first_rows|all_rows]

Andreas


Re: AW: LIMIT in DECLARE CURSOR: request for comments

От
Philip Warner
Дата:
At 14:14 31/10/00 +0100, Zeugswetter Andreas SB wrote:
>> 
>> Which is why I like the client being able to ask the 
>> optimizer for certain kinds of solutions *explicitly*.
>
>Yes, something like:
>    set optimization to [first_rows|all_rows]
>

That's one way that is usefull for affecting all subsequent statements, but
it would be nice to also allow such things in each statement, eg. in comments:
   /*++optimizer: fast_start, no_seq_scan */   select...

ie. make all settable values dynamically settable in a statement. The scope
of the settings would probably have to depend on the abilities of the
optimizer - eg. how would subselects and views be handled?


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/