Icon View Incident Report

Minor Minor
Reported By: Matthew Jones [Banxia Software Ltd]
Reported On: 6/20/2013
For: Version 4.35 Build 2
# 3838 Query Execution Plans Not Being Cleared Unless UnPrepare is Called

I have an application that does repeated calls to the same DBISAM query in a thread. The thread starts by initialising the query, and then calls .Close and .Open to get the latest results. However, over a period of about an hour, it gets progressively slower to perform its actions, eating more and more processor.

In preparing this post (copied here as an incident report), I found the cause, but it needs fixing in DBISAM. The code is effectively the following.

After an hour, the resulting xQuery.Plan.Text for this query is 13182102 bytes in size! Note that the code sets it to an empty string, but after the call it is set to the plans of every query ever made, which at 4 times a second over an hour is a few...

xQuery.Close;
xQuery.ParamByName('TIMEOUT').AsDateTime := Now;
xQuery.GeneratePlan := True;
xQuery.Plan.Text := '';
xQuery.Open;
if Pos('UN-OPTIMIZED', xQuery.Plan.Text) > 0 then
   ReportDatabaseIssue;
if not xQuery.EOF then
	result := true;



Resolution Resolution
Fixed Problem on 6/21/2013 in version 4.36 build 1


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM ODBC Trial
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image