Cursor size and memory/speed

Robert Brenstein rjb at robelko.com
Fri Feb 18 14:13:46 CST 2005


>On 2/18/05 1:56 AM, "Keith DeLong" <delong at redcort.com> wrote:
>
>>  Ruslan (or anyone who knows this),
>>
>>  I am doing a cursor selection and am concerned only eith the final record
>>  according to the ORDER BY of my selection (cur.current position =
>>  cursor.recordcount)
>>
>>  If this is all I am doing with the cursor, does it matter significantly from
>>  Valentina's perspective in terms of speed and/or memory use if the cursor is
>>  500 records or 500 thousand records?
>
>In the second case you will eat 1000 times more RAM.
>Because cursor is kind of array of RecIDs.
>The bigger selection the bigger array.
>
>     500K recs * 4 bytes = 2MB
>
>>  If it matters alot, I can take the time to put a bottom boundary on my
>>  select. If it doesn't matter much, it simplifies my world greatly :-)
>
>If you can reduce the number of selected records better do this.
>
>>  I don't have any really large database files to test this so I appreciate
>>  any feedback. I'm using V4RB 1.11.
>
>--
>Best regards,
>Ruslan Zasukhin      [ I feel the need...the need for speed ]

What about sql option to return only n top records?

Robert


More information about the Valentina mailing list