Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 1 Jahr, 4 Monaten
Letzter Beitrag:
vor 1 Jahr, 4 Monaten
Beteiligte Autoren:
StanleyBarnett, GuenterP, Paulo Oliveira, Fabrice Harari

Re: Does HFSQL release disk space upon Mass Data Deletion?

Startbeitrag von StanleyBarnett am 07.07.2016 17:06

Hi,

If a data file grows to 50gb and after deleting 40gb of data, does the physical size of the file reduce to reflect its true size.

Is this topic discussed in any of the documentation? I have not seen any...

MSSQL Server has issues with this as it does not want to release that space even with truncate after a defrag.

Thanks, Stanley

Antworten:

Re: Does HFSQL release disk space upon Mass Data Deletion?

As farf as i know the spaces isn't reduced automaticly.

Check this help pages:
http://doc.windev.com/en-US/?3044018
http://doc.windev.com/en-US/?35400015
http://doc.windev.com/en-US/?3519004

von Paulo Oliveira - am 07.07.2016 17:21

Re: Does HFSQL release disk space upon Mass Data Deletion?

Hi

no it does not... Space will be reused automatically by new records, but if you want to give it back to the file system, you need to run a reindexation to do that

Best regards

von Fabrice Harari - am 07.07.2016 19:32

Re: Does HFSQL release disk space upon Mass Data Deletion?

Thanks Paulo and Fabrice!!

Stanley

von StanleyBarnett - am 08.07.2016 05:36

Re: Does HFSQL release disk space upon Mass Data Deletion?

Hi,

there is WDOptimizer ( http://help.windev.com/en-US/?3519002&name=wdoptimizer_overview ) for optimizing the index files and a lot more of fine-tuning a HFSQL file. WDOptimizer can be distributed together with your Wx application. WDOptimizer optimizes the internal structure of HFSQL files with the goal to optimize the access speed at run time.

Unfortunately, as you can deduct from the command line parameters of WDOptimizer ( http://help.windev.com/en-US/?3519005 ), optimizing access to a HFSQL file does not mean to compact the file to the utmost. This will slow down access times when adding new records.

There's even a function HAccelerateSpeed(...) in order to optimize the access speed to HFSQL files while running a Wx program!

If you really want to compact your file size then there's only one method: read the data sequentially from file A and insert it into a file B with the same structure. Depending on the file's structure, for a practical implementation there are two ways to go. a - simple: export the data into an ASCII / Unicode file, HCreation(...) of the original file and re-import the data. b - copy the files (HCopyFile(...) will do that for you on HFSQL C/S) of the original file to a file of a different name (e.g. CUSTOMER => CUSTOMERB), HCreation(...) the CUSTOMER file, then HDescribeFile / HDescribeItem file CUSTOMERB and its items, HOpen CUSTOMERB, read it sequentially and insert each record into file CUSTOMER. Maybe, the latter can be accomplished easier the HDeclare oder HDeclaerExternal but I do not have any experience with that. There may be even a method to compact a file using replication ..

von GuenterP - am 08.07.2016 15:12
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.