out-of-memory
out-of-memory
I am reading through a whole table with 6 mio records, but ends up running out of memory (with 16 GB), way before I have reached the end. The code below is a cut down version, to illustrate it. Using MSSQL and postgresql works OK, on the same code and data.
The table contains a SDO_GEOMETRY field and that is obviously what is causing the leak, but since I need to read and process it, I can not skip it. This used to work in earlier versions of ODAC / Unidac, but I can not say exactly which one.
You can ignore the support request sent through your form on the website. As long as you fix the bug !
var
Con: TUniConnection;
Qry: TUniQuery;
attribute: word;
f: TField;
begin
Con:= TUniConnection.Create(nil);
Con.ProviderName := 'Oracle';
Con.SpecificOptions.Add('Direct=True');
Con.Server := 'DELL-2:1521:XE';
Con.Username := 'GIS1';
Con.Password := 'xxxxx';
Con.Database := '';
Con.LoginPrompt := False;
Con.Open;
Qry:= TUniQuery.Create(nil);
Qry.Connection := con;
Qry.SQL.Add('select * from mytable');
Qry.open;
f:= Qry.FindField('attribute');
while not Qry.eof do
begin
attribute := trunc(f.value);
Qry.Next;
end;
Qry.Close;
Con.Close;
end;
The table contains a SDO_GEOMETRY field and that is obviously what is causing the leak, but since I need to read and process it, I can not skip it. This used to work in earlier versions of ODAC / Unidac, but I can not say exactly which one.
You can ignore the support request sent through your form on the website. As long as you fix the bug !
var
Con: TUniConnection;
Qry: TUniQuery;
attribute: word;
f: TField;
begin
Con:= TUniConnection.Create(nil);
Con.ProviderName := 'Oracle';
Con.SpecificOptions.Add('Direct=True');
Con.Server := 'DELL-2:1521:XE';
Con.Username := 'GIS1';
Con.Password := 'xxxxx';
Con.Database := '';
Con.LoginPrompt := False;
Con.Open;
Qry:= TUniQuery.Create(nil);
Qry.Connection := con;
Qry.SQL.Add('select * from mytable');
Qry.open;
f:= Qry.FindField('attribute');
while not Qry.eof do
begin
attribute := trunc(f.value);
Qry.Next;
end;
Qry.Close;
Con.Close;
end;
Re: out-of-memory
We tested the operation of UniDAC 7.3.10 according to your description and did not find any memory leaks. For further investigation, please compose and send us a small full test sample demonstrating memory leaks occurrence. In addition, we will need a DDL script to create the table used in this sample, as well as a sample filling it with test data. It is convenient to do via the e-support form (https://www.devart.com/company/contactform.html).
Re: out-of-memory
Maybe you can tell me about the content of the table you have tested with?
Which fields and what type of SDO_GEOMETRY? Points, lines, polygons?
How many records?
We can also do a skype session with screen sharing, so you can see for yourself. Obviously the issue is the data, since the test application is as simple as it can be. Even this simple test gives an out-of-memory after about 1 mio records:
Qry.SQL.Add('select geoloc from mytable');
Qry.open;
while not Qry.eof do
begin
Qry.Next;
end;
Which fields and what type of SDO_GEOMETRY? Points, lines, polygons?
How many records?
We can also do a skype session with screen sharing, so you can see for yourself. Obviously the issue is the data, since the test application is as simple as it can be. Even this simple test gives an out-of-memory after about 1 mio records:
Qry.SQL.Add('select geoloc from mytable');
Qry.open;
while not Qry.eof do
begin
Qry.Next;
end;
Re: out-of-memory
To investigate the issue, we will need a DDL script to create the table used in your sample. Please also provide a sample of filling this table with data (for this, it is enough to fill no more than 10 rows of this table). Specify whether the issue with memory leaks in your environment when requesting a table containing a small number of rows. Perhaps when processing a large number of records the UniDirectional mode will help you: https://www.devart.com/unidac/docs/deva ... tional.htm
To provide any additional information on the issue, it is convenient using the e-support form https://www.devart.com/company/contactform.html.
To provide any additional information on the issue, it is convenient using the e-support form https://www.devart.com/company/contactform.html.
Re: out-of-memory
1) How to DDL create from an existing table? I have no experience doing so
2) How to add data, using SDO_GEOMETRY? I have only been reading data so far.
If you can show that using line objects, I can add the actual data,
All my data has been uploaded using MapInfo Easyloader:
http://www.pbinsight.com/support/produc ... easyloader
This both creates the table and fills it with content.
2) How to add data, using SDO_GEOMETRY? I have only been reading data so far.
If you can show that using line objects, I can add the actual data,
All my data has been uploaded using MapInfo Easyloader:
http://www.pbinsight.com/support/produc ... easyloader
This both creates the table and fills it with content.
Re: out-of-memory
Setting unidirectional to false, seems to fix the issue. Testing some more now.
Re: out-of-memory
We will be waiting for the results of testing in your environment.
Re: out-of-memory
Yes, that fixed it.
Re: out-of-memory
We are glad to see the problem resolved. Please don't hesitate to contact us with questions concerning our product usage.