|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dear All
I am currently doing a number pattern analyzing program. I use Firebird as my database, Delphi as my dev. tool. I use only 3 table, and no more then 10000 rows of data. Each data is less then 200 byte. But after program finish, the database it grow to 202MB . Then I backup the database, it shink back to 56KB. Can anyone tell me what's happening? Or anyway I can keep the database small. Thanks... ![]() |
|
#2
|
|||
|
|||
|
Quote:
That's because your program is creating a lot of record versions when you have a lot of transactions. Don't worry, Firebird will recycle that space, and it will work faster next time because there is no need to allocate space on disk. -- Best regards, Fikret Hasovic http://fikret.fbtalk.net USAID TAMP Senior Programmer * FirebirdSQL Foundation member. - Join today at http://www.firebirdsql.org/ff/foundation * JEDI VCS contributor http://jedivcs.sourceforge.net/ * Firebird and Fyracle news http://www.fyracle.org/shownews.php |
|
#3
|
|||
|
|||
|
Thank you for the reply
. But it's there any way, I can stop the record versioning? Or limited the size of transaction log?Just like you said, the program it self use a lot of transaction. If I use the ordinary harddisk to run it, then it will take about 2~3 week to finish one cycle of pattern analyzing , which is too slow. So I put the database file on a ramdisk,can refer to http://www.superspeed.com/servers/ramdisk.php. It really speed up, but just eat up too much memory . Btw, during the program running, I even use the gfix -sweep to force clean up the free space, but It seeks not working. It's there a gfix problem ? Or gfix don't apply on firebird ? |
|
#4
|
||||
|
||||
|
Why don't you use only one transaction ?
Do a "hard commit" (commit) instead of a "soft commit" (commit retaining). |
|
#5
|
|||
|
|||
|
Quote:
Sorry, I don't understand what you mean ? What is the differences between "hard commit" and "soft commit" ? I do commit every transation manully. In the program, I use 15 thread to process the data. Each thread contain two transaction component, one for select and update, one for delete(wipe out the calculated data). So the program process flow like this: 1.Initial thread 2.getting data(each thread) 3.process each record(start / commit update transation) 4.Wipe out the calculated data(start / commit delete transction) 5.repeat step 2 to 5 until end of data So can you please help me, point out where might be wrong? Thank you....^_^ |
|
#6
|
|||
|
|||
|
Please post your question on firebird support list (yahoo group).
You will get much more answers than here... -- Best regards, Fikret Hasovic http://fikret.fbtalk.net USAID TAMP Senior Programmer * FirebirdSQL Foundation member. - Join today at http://www.firebirdsql.org/ff/foundation * JEDI VCS contributor http://jedivcs.sourceforge.net/ * Firebird and Fyracle news http://www.fyracle.org/shownews.php |
|
#7
|
||||
|
||||
|
Quote:
I really don't understand why do you use the database ... if you "clean" it up at the end ... you should do all the processing without the database then maybe ? |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Database Size problem?? Please Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|