Icon View Incident Report

Serious Serious
Reported By: Terry Swiers
Reported On: 9/16/2008
For: Version 2.01 Build 5
# 2797 TEDBQuery OnProgress Event Handler Firing Continuously When Progress Hits 100%

I'm working on a benchmark utility that will allow me to show one of my end users the difference in performance that they will see after we move thier custom application to EDB from DBISAM. In short, they wanted to see that there would be at least some bit of performance before they pay me a whole bunch of money to convert their application. Unfortunately I'm seeing the opposite of what I expected in terms of performance and will never be able to convince them that moving to EDB will provide them any benefit.

Details:

1. I'm using both ElevateDB manager and DBSYS to eliminate any issues with my own code.

2. The data is identical between the two database and the EDB data was migrated over to EDB using the standard DBISAM 4 migrator. I have NOT made any changes to the table buffers or modified any indexes since the migration.

3. The query that I'm using for testing is a query generated by ReportBuilder end user report designer, so I don't have the luxury of reworking the query.

4. The query was unprepared between executions to simulate the way that the query (invoice printing) would work in the real application as a new query object is created for each print job.

5. The real world environment that this will run in has enough users hitting the database hard enough that I cam be relatively sure that subsequent runs of the query will not used cached or buffered data. In other words, I can't rely on the OS file caching or buffering to maintain performance.

6. My testing environment involves a DBISAM and EDB server sitting on my remote web server connecting via the internet. There is very little database traffic on my site, so right now the buffering and file caching should make subsequent runs of the same query against the same data rather quick.

7. I'm using the latest builds of both DBISAM and EDB.

8. I'm using the "speed" table as the way of limiting the result set. So if I want to print 3 different invoices in the same print job, I populate the speed table with the 3 invoice numbers that I want to print and let the inner join do the result filtering for me.

9. A condensed version of this query which produces the same results is as follows.

Results:

DBISAM first run execution is approximately 2 seconds for the first run. Subsequent executions after unpreparing run about 0.15 seconds.

EDB first run execution is between 9 and 10 seconds for the first run. Subsequent executions run about 8 to 9 seconds.

SELECT invoice.Number, invitem.StockCode,
      code.Descr, cust.LastName
FROM invoice invoice
      INNER JOIN speed speed ON
     (speed.NUMBER = invoice.Number)
      INNER JOIN invitem invitem ON
     (invitem.Number = invoice.Number)
      LEFT OUTER JOIN code code ON
     (code.StockCode = invitem.StockCode)
      LEFT OUTER JOIN cust cust ON
     (cust.CustNum = invoice.CustNum)
ORDER BY invoice.Number, invitem.StockCode



Comments Comments and Workarounds
The issue was that the query would hit 100% progress and then proceed to continuously send thousands of progress messages to the client. This wasn't as visible when executing on a LAN or locally, but would appear when executing a query over the Internet with an OnProgress event handler attached for the TEDBQuery component. The workaround is to disconnect any OnProgress event handler for the TEDBQuery compoonent when executing a query in such an environment.


Resolution Resolution
Fixed Problem on 9/17/2008 in version 2.02 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image