Subject RE: [IBO] Firebird 3 and Blob Fields with IBO !
Author Jason Wharton
Part of it could be that you are calling Open and then First, which with a unidirectional cursor, calling the First method closes, if open, and then reopens the cursor.  That's the only way a unidirectional dataset can know it is on the first record.
 
Perhaps you could be more descriptive about what part of the whole process is slow?
 
Jason Wharton
wwww.ibobjects.com
 


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Monday, March 11, 2019 10:36 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Firebird 3 and Blob Fields with IBO !

 

Hello,


Could someone show me how to better way of the load with blob Field sub_type 0 ? for example. I have a table with just only 3 fields and 6220 records:


ID INTEGER

TEMPLATE BLOB SUB_TYPE 0

FINGER INTEGER


When I do a query on IBEXPERT is impressive the speed, the result set time is:


Plan

PLAN (ASSOCIADO_BIOMETRIA NATURAL)


------ Performance info ------

Prepare time = 741ms

Execute time = 60ms

Avg fetch time = 5,00 ms

Current memory = 11.439.512

Max memory = 16.698.304

Memory buffers = 2.048

Reads from disk to cache = 0

Writes from cache to disk = 0

Fetches from cache = 2.125


But when I use IBO to load records with Blob Field it's very slow, there are  workaround ?



  with IB_Cursor_Biometria do

  try

    SQL.Clear;

    SQL.Add('SELECT MATRICULA, DIGITAL_TEMPLATE, DIGITAL_DEDO FROM ASSOCIADO_BIOMETRIA ORDER BY DIGITAL_DEDO DESC, MATRICULA');

    Open;

    Prepare;

    First;


    while not eof do

    begin

      AddBiometria(Fields[0].AsString, ConverteBiometria(Fields[1].AsString), Fields[2].AsInteger, True, True);

      Next;

    end;

  finally

    Free;

  end;


Thanks in advance,

Antonio.