English 中文(简体)
火灾鸟类复食是否令人沮丧,是否有办法避免吗?
原标题:Firebird backup restore is frustrating, is there a way to avoid it?

I am using Firebird, but lately the database grows really seriously. There is really a lot of delete statements running, as well update/inserts, and the database file size grows really fast. After tons of deleting records the database size doesn t decrease, and even worse, i have the feeling that actually the query getting slowed down a bit. In order to fix this a daily backup/restore process have been involved, but because of it s time to complete - i could say that it is really frustrating to use Firebird.

  • 欢迎任何关于这项工作或解决办法的想法。

  • 同样,我正在考虑转向国际数据库,因为我从朋友那里听到,它没有这个问题——这是这样吗?

最佳回答

我们拥有大量关于生产中的火灾鸟类的数据库,但从未出现过数据库增长的问题。 是的,每次删除记录或更新其旧版本时,都将保留在档案中。 但是,一个垃圾收集器会越早越出越野。 一旦两个过程相互平衡,数据库档案将只增加新数据和指数的规模。

As general precaution to prevent an enormous database growth try to make your transactions as short as possible. In our applications we use one READ ONLY transaction for reading all the data. This transaction is open through whole application life time. For every batch of insert/update/delete statements we use short separate transactions.

数据库运行的缓慢可能来自过时指数状况。 这里,你可以找到一个实例,说明如何重新计算所有指数的统计数字:。 http://www.fire鸟类faq.org/faq167/

问题回答

如果你在申请中未完成交易,请进行检查。 如果交易开始,但未承诺或停止,数据库将自行修订以往最活跃的交易之后的每一交易。

You can check the database statistics (gstat or external tool), there s oldest transaction and the next transaction. If the difference between those numbers keeps growing, you have the stuck transaction problem.

还有一个监测工具,即检查情况,一个我使用的是Sinatica火灾鸟类监测器。

<><>Edit>: 此外,数据库档案也自动缩小。 其部分被标记为未使用(在扫清行动之后),将再使用。 http://www.fire鸟类faq.org/faq41/

The space occupied by deleted records will be re-used as soon as it is garbage collected by Firebird. If GC is not happening (transaction problems?), DB will keep growing, until GC can do its job.

此外,如果你在一张桌上做大量删除,就存在问题(如:数百万记录),该表中的下一个选择是“夸大”垃圾收集,而业绩将下降至GC完成。 解决这一问题的唯一途径是在服务器没有被充分利用的情况下进行大规模删除,并在使用后操作一盘旋,确保不会发生仓促的交易。

此外,铭记如果你使用“标准”表格持有临时数据(即:插入信息并多次删除),你在某些情况下可以获得腐败的数据库。 我强烈建议你开始使用全球临时表格。





相关问题
what is wrong with this mysql code

$db_user="root"; $db_host="localhost"; $db_password="root"; $db_name = "fayer"; $conn = mysqli_connect($db_host,$db_user,$db_password,$db_name) or die ("couldn t connect to server"); // perform query ...

Users asking for denormalized database

I am in the early stages of developing a database-driven system and the largest part of the system revolves around an inheritance type of relationship. There is a parent entity with about 10 columns ...

Easiest way to deal with sample data in Java web apps?

I m writing a Java web app in my free time to learn more about development. I m using the Stripes framework and eventually intend to use hibernate and MySQL For the moment, whilst creating the pages ...

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

How can I know if such value exists in database? (ADO.NET)

For example, I have a table, and there is a column named Tags . I want to know if value programming exists in this column. How can I do this in ADO.NET? I did this: OleDbCommand cmd = new ...

Convert date to string upon saving a doctrine record

I m trying to migrate one of my PHP projects to Doctrine. I ve never used it before so there are a few things I don t understand. In my current code, I have a class similar to this: class ...

热门标签