Re: Numer of rows in a cursor
Posted in 1997
Dr. Peer Griebel wrote: > > How can I determine the number of rows accessible by an open cursor? > For example I could go to the last row and determine it's number. But > how to determine this number? > > Do I have to do a 'select count ...' to determine the number of rows > or is there some other way? You can't. The only way the optimizer can figure out how many rows there are in the active set is to go out there and count'em. Which is what you would be doing anyway. I suppose it would have been possible for optimizer to do this for the simplest queries (where indexed-column = value) but very few queries fit this bill. -- -- Jake Salomon . . _..-'( )`-.._ ./'. '||\\\\. }\\_/{ .//||` .`\\. ./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\. ./'..|'.|| |||||\\`````` \\'@'/ ''''''/||||| ||.`|..`\\. ./'.||'.|||| ||||||||||||. | .|||||||||||| ||||.`||.`\\. /'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\ '.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.` '.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.` |/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\| V V V }' `\\ /' `{ V V V \\ \\ \\ V / / / +-----------------------------------------------------------+ | Diplomacy: The art of getting something off your | | chest without losing your shirt | +------------------------Alfred E. Neuman-------------------+