Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr, 10 Monaten
Letzter Beitrag:
vor 1 Jahr, 9 Monaten
Beteiligte Autoren:
Michael Drechsel, DerekT, Jose Antonio Garrido, Yogi Yang, Stefan Bentvelsen, Fabrice Harari

[WD2X] Performance of HF SQL Server

Startbeitrag von Michael Drechsel am 22.07.2016 09:46


I have a stopwatch in my application before I call HEXECUTEQUERY() and after Tabledisplay() I stop the watch.

I found a funny behaviour (local or over the internet, different databases, all the same)

The first call is quit fast (1-2 seconds), the next calls taken 5-6 seconds.
Whats the reason ?

IMHO HF SQL should be faster after the first call (cache).

Any ideas ?

Mmh, it looks like that the Problem is "tabledisplay". It tooks 5 times longer after the first call.


Hi Michael,

do you use MyTable..DisplayEnabled = False before and MyTable..DisplayEnabled = True after TableDisplay()?

von Stefan Bentvelsen - am 22.07.2016 15:24

I have also observed this behavior that is after first call to TableDisplay the consecutive calls to TableDispaly seem to be slower... but I thought it is only me as no one has ever reported this here.

In my case this seems to happen even when I am using HF SQL Classic.


Yogi Yang

von Yogi Yang - am 23.07.2016 04:09
Hi Stefan,

yes, it makes no difference.

The table has ~6.500 rows.

It looks like that tabledisplay (delete+fill) take some more time as only fill in the first time.

OK I found it:

The content is loaded in memory (not direct access, because of special sort option). If I change it to direct access, all calls using the same time .....
Mhh, thats not good ....

von Michael Drechsel - am 23.07.2016 06:07

[WD2X] Performance of HF SQL Server [SOLVED[

Ok, here a solution:

Put a


before the "HEXECUTEQRY"

and then a


before the "tabledisplay". (You don´t need a tabledisplay anymore in this case)

Then all calls use the same time.

von Michael Drechsel - am 23.07.2016 06:37
Hi Michael,

I wonder if you measured the time needed for the Mytable..BrowsedFile="". This SHOULD be equal to your time difference (the time needed to EMPTY the table, if that is where it's coming from)...

Best regards

von Fabrice Harari - am 25.07.2016 17:40
Hi Fabrice,


If I don´t use Mytable..BrowsedFile="" the whole process takes 5 secondes, with that only 1-2 seconds.

Like I wrote, it happens only if you use Query based Tables loaded in memory .... (not direct access)

von Michael Drechsel - am 25.07.2016 18:21
Hi Michael.
So as you said the this behavior happens also on local database hfclassic, so i did a test:

I have a query of about 86000 records. That's 10 times the size of your example.
I also have a table control with 17 columns, all visible.
I created the table control with all default options but "loaded in memory" instead of "direct access", as I like that way. Anyway I tried with "direct access" it was exactly the same times, and it makes sense.

Method 1:
trace(chronovalue()) // about 1200 milliseconds

Method 2:
trace(chronovalue()) // about 1200 milliseconds

Subsequent calls to both takes the same amount of time.

So I wonder why are you getting those differencies, and also those large times.

José Antonio.

von Jose Antonio Garrido - am 26.07.2016 11:35
Hi Jose,

I defined a special sort option ("ignorecase") for all my string fields, maybe this is the reason.

von Michael Drechsel - am 26.07.2016 11:59

Hows about defining a array based on a structure and bind the table to the array




Sort will be blistering fast as it is being done in memory.

von DerekT - am 26.07.2016 12:46
Hir Derek,

ok, but what´s the difference between "your" memory solution and "PC Softs loaded in memory" ?
It´s both memory .... and should work in the same time ....

Apropos, my solution has a bad sidekick .... hsavescrollbar doesn´t work anymore ... so I went back to tablediplay()

von Michael Drechsel - am 26.07.2016 12:54
Michael Drechsel
Hir Derek,

ok, but what´s the difference between "your" memory solution and "PC Softs loaded in memory" ?
It´s both memory .... and should work in the same time ....

Apropos, my solution has a bad sidekick .... hsavescrollbar doesn´t work anymore ... so I went back to tablediplay()

Only difference I can see is that I use ArraySort() before I ever get near displaying the result
I assume you are using TableSort() - so unless the PC Soft solution acknowledges the fact that you have checked the ' in memory' option and therefore issues,in the background, a TableDisplay() for you I would think they are sorting the table.

Just a guess of course

von DerekT - am 26.07.2016 19:44
Hi Derek,

I use the AAF Tablesort in the header of the table. Every user understand, how to use it :-)

von Michael Drechsel - am 27.07.2016 06:31
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.