Problem with 1.11

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Apr 26 23:25:02 CDT 2006


On 4/26/06 11:10 PM, "Pete Gates" <pete at fxlibrary.co.uk> wrote:

Hi Pete,

So I assume this is VCOM 1.11, Windows, Delphi. Right?

Advice from start. If you need so intensive updates, and IF you do not use
and not going to use REMOTE server, then use not SQL but API way. IT will
work in TIMES faster.

Also I's like to ask: any chance upgrade to VCOM 2 ?
With VCOM2 we could test this on our side..
Actually may be with V2 you will not see such behavior..

In your case, please check Process Manager, if RAM is not leaking...


> Hi,
> I've got a table structure like this (Version 1.11 Valentina):
> 
> CREATE TABLE system
> (key String(64,"ASCII") NOT NULL UNIQUE INDEXED,
> stringdata VarChar(200,"ASCII"),
> intdata Long,
> booldata Boolean);
> 
> I'm doing a rapid modification of 1 row (there are only half a dozen
> rows in the table) and after several 10s of thousands of updates, access
> to the database slows to a crawl - only an update a second. Accessing
> other tables also becomes very slow.
> 
> Delphi code but you'll get the idea (also as a separate question is
> there a single 'INSERT OR UPDATE' statement?):
> 
> var
>   search: CursorRef;
> begin
>   search := DataBase_SqlSelect(userdb, pchar(format('SELECT * FROM
> system WHERE key=%s', [QuotedStr(key)])), kServer, kReadWrite, kRandom);
>   if Cursor_GetRecordCount(search) > 0 then
>   begin
>     Field_PutString(Cursor_GetField(search, 'stringdata'),
> pchar(value.k_string));
>     Field_PutLong(Cursor_GetField(search, 'intdata'), value.k_int);
>     Field_PutBoolean(Cursor_GetField(search, 'booldata'),
> byte(value.k_bool));
>     Cursor_Updaterecord(search);
>     Cursor_Remove(search);
>   end else
>   begin
>     Cursor_Setblank(search);
>     Field_PutString(Cursor_GetField(search, 'key'), pchar(key));
>     Field_PutString(Cursor_GetField(search, 'stringdata'),
> pchar(value.k_string));
>     Field_PutLong(Cursor_GetField(search, 'intdata'), value.k_int);
>     Field_PutBoolean(Cursor_GetField(search, 'booldata'),
> byte(value.k_bool));
>     Cursor_Addrecord(search);
>     Cursor_Remove(search);
>   end;
>   DataBase_Flush(userdb);
> 
> Any ideas?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list