I am using firebird-embedded 2.1 and latest stable 
firebirdsql.data.firebirdclient.dll.

I have investigated the poor database-query performance in my program.
I have a simple table RECORDED_FLOAT_VALUE with 4 Columns:
FK_VALUE_DEFINITION (integer)
FK_MEASUREMENT_RECORDING (integer)
ELAPSED_TIME (integer)
VALUE (float)

Testquery:
SELECT * FROM RECORDED_FLOAT_VALUE WHERE FK_MEASUREMENT_RECORDING IN 
([some id's like 91, 92, 93...])
If i run this query in ibexpert-consoleit needs 13,4s to give over 600.00 
results.
Within my .net-application the same query needs 75s to end.

.Net-Code looks like this:
        //selectQuery = "SELECT * FROM RECORDED_FLOAT_VALUE WHERE 
FK_MEASUREMENT_RECORDING IN ([some id's like 91, 92, 93...])"

        FbDataAdapter fillDataAdapter = new FbDataAdapter();
       fillDataAdapter.SelectCommand = new FbCommand(selectQuery, 
m_FBConn); 
       if (m_Transaction != null) {
        fillDataAdapter.SelectCommand.Transaction = m_Transaction;
        }

        fillDataAdapter.Fill(table);
 

All the time (75s) was spent in fillDataAdapter.Fill(table);
The only difference between my programm and ibexpert-console is that i'am 
filling a dataTable with the data 
and ibexpert has it in memory. Tryed to use 
table.BeginLoadData/EndLoadData around .Fill with no benefit.
Also tryied to use DataReader instead ob DataAdapter.Fill but it was even 
slower.
Somebody has some idea why ibexpert is more than 5 times faster than my 
code?
 
 
SICK Engineering GmbH - Sitz: Ottendorf-Okrilla - Handelsregister: Dresden 
HRB 3435 
Geschäftsführer: Dr. Volker Herrmann - Frank Knöfel 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to