Colleagues:
We recently started to experience quite bazzar behavior of a simple INSERT (SQL) command, i.e.
If you issue after that
the IF condition above is almost always True, and program enters IF...ENDIF code block.
This started when we and our customers switched from WinNT 4 to WinNT 5 (and WinNT 2003) servers with RAID HDD system. Considering that this system has what I call "heavy buffering", I've come to suspect that INSERT does not actually write the contents of mem. vars onto file on disk but just keeps it there, and with the next INSERT (I do it in cycle) the contents of the latest mem.vars gets lost. Therefore, I modified the above part like this:
Still, sometimes FLUSH after INSERT and/or REPLACE commands does not do the job. So, out of sheer desperation, I put FLUSH in cycle as well, i.e.
and
This worked 99% of the times, but still this remaining 1% of uncertainty bothers me a lot. By Murphy's law, this 1% is bound to happen at the most "juicy"
customer's system.
Is there any way to ensure 100% that the INSERT and/or REPLACE commands are actually writing onto disk, not into memory buffers without FLUSHing buffers 5 times in a row (thus slowing the performance)? OR - are there any other commands or settings that are designed specifically to bypass the memory buffers and write data directly onto HDD?
AHWBGA.
Regards,
Ilya
We recently started to experience quite bazzar behavior of a simple INSERT (SQL) command, i.e.
Code:
INSERT INTO (DBF("TABLE_ALIAS")) FROM MEMVAR
Code:
GO BOTTOM IN TABLE_ALIAS
IF TABLE_ALIAS.FieldN # m.FieldN
&& Some code
ENDIF
This started when we and our customers switched from WinNT 4 to WinNT 5 (and WinNT 2003) servers with RAID HDD system. Considering that this system has what I call "heavy buffering", I've come to suspect that INSERT does not actually write the contents of mem. vars onto file on disk but just keeps it there, and with the next INSERT (I do it in cycle) the contents of the latest mem.vars gets lost. Therefore, I modified the above part like this:
Code:
INSERT INTO (DBF("TABLE_ALIAS")) FROM MEMVAR
FLUSH
Code:
INSERT INTO (DBF("TABLE_ALIAS")) FROM MEMVAR
FOR I=1 TO 5
FLUSH
NEXT I
Code:
REPLACE TABLE_ALIAS.FieldN WITH m.FieldN IN TABLE_ALIAS
FOR I=1 TO 5
FLUSH
NEXT I
![[wink] [wink] [wink]](/data/assets/smilies/wink.gif)
Is there any way to ensure 100% that the INSERT and/or REPLACE commands are actually writing onto disk, not into memory buffers without FLUSHing buffers 5 times in a row (thus slowing the performance)? OR - are there any other commands or settings that are designed specifically to bypass the memory buffers and write data directly onto HDD?
AHWBGA.
Regards,
Ilya