Subject | Re: [firebird-support] Re: how can the creation of fb_sort files be avoided? 2.2 GB of fb_sort files |
---|---|
Author | |
Post date | 2018-08-07T19:43:13Z |
Hello...
I was interested in this post so I did a little research on the subject.
To begin with, if the original poster of the issue is seeing the creation of 2gig temporary files for specific sorts against a single database, this must be one enormous database.
That being said, if this is the case than it is very possible that the sorts being executed are being done against way too much data and if so, they would take quite a while under even the best of circumstances. As a result, it may be worth while to see where unnecessary data to the sort could be eliminated prior to a sort being initiated.
If such large temporary files are the result of many small data sorts than this issue has been reported on other sites, whereby posters are seeing similar problems with temporary sort files growing increasingly larger and then in some cases, crashing the applications.
If the case is one where the database in question is very large and the subsequent sorts are a necessity as they are, it may be worth considering and adjunct piece of software to Firebird, called "HqBird", which uses Firebird as its base database engine. "HqBird" was designed for Firebird databases that are by necessity very large and require more power and capabilities than the standard version may offer. A similar situation has arisen with the equally powerful PostgreSQL database engine where when extensive power is required, the EnterpriseDB database engine has been developed using PostgreSQL as a base. EnterpriseDB can now provide Oracle-like capabilities at a fraction of the cost.
The link to review this additional software (HqBird) is below...
If on the other hand, the database size(s) is\are not the issue than adjustments may be made to the Firebird configuration files to change the size of memory being used for such sorts before relying on virtual disk utilization with temporary files.
It should be noted that based on Firebird documentation and other Firebird posters I have read, all temporary sort files should be deleted after the sort or the transaction has been successfully completed.
If either does not complete successfully, the temporary sort files will be left in place. However, these can be manually deleted without any issues arising since they are in fact only temporary files.
Here are some links to, admittedly older information, regarding configuring such relevant parameters for sorting in Firebird...
I hope this information will afford the original poster of the issue, at the very least, some direction...
Steve Naidamast