Source language: Translate to:

Result table speed drawback

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Result table speed drawback

Postby HPW » Mon May 05, 2008 2:31 am

I have a observation about dbpExecSQL and it's result table.
(My SQL query deliver 4 records with 2 fields)

Code: Select all
dbpExecSQL "MyOracle" "SELECT pos_nr,textzeile FROM V_MBI_AFTXT where Satzart = 'PN' and afsta_serial = 577170 and zeilen_nr = 1 order by zeilen_nr" "Temp1"


This line needs 6437 milliseconds on my PC.

Code: Select all
dbpExecSQL "MyOracle" "SELECT pos_nr,textzeile FROM V_MBI_AFTXT where Satzart = 'PN' and afsta_serial = 577170 and zeilen_nr = 1 order by zeilen_nr" ""


This line needs only 79 milliseconds on my PC. (Faktor ~80)

The only difference is the optional temporary result tabel.
I get correct .$RecNum and .$RecCount on both querys!
I can show each result line by iterating with:

dbpNext "MyOracle" "V_MBI_AFTXT"

So should I build my own custom view with other output objects by iterating through the result?

What takes so much time?
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Neosoft Support » Mon May 05, 2008 10:35 am

There are no deliberate delays built into the plug-in, but creating the temporary table does require allocating memory and creating new dataset and grid objects. However, you can reuse the temporary table for future queries, and I would think that once the table is created, query speed should be comparable to the non-temp table method.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby HPW » Mon May 05, 2008 12:47 pm

Thanks for the suggestions.
But in my situation with a commandline tool which is called from an autocad-enviroment, the startup and display time of the query matters very much.
So my workaround with a loop which adds records to a ColumnListbox-object (hpwUtility) displays the result-set almost instantly.
The table-creation is simply too much overhead.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron