New topic: 

RB 2009 r5 -- REALSQLdatabase Vacuum command

<http://forums.realsoftware.com/viewtopic.php?t=31370>

       Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic         Author  
Message       Shedrik           Post subject: RB 2009 r5 -- REALSQLdatabase 
Vacuum commandPosted: Wed Dec 02, 2009 7:50 am                        
Joined: Tue Jan 29, 2008 12:24 pm
Posts: 7              Hello,
I have a question about Vacuum command (REALSQLdatabase).

after the command:
db.SQLExecute( "vacuum" )
database shows the next error message:
"cannot VACUUM from within a transaction"

But there are no active transactions.
And code works fine with RB2009R4.
Where could be the problem?

-------------------
RB 2009 R5 on Mac OS X 10.6.2   
                            Top               simonjohn           Post subject: 
Re: RB 2009 r5 -- REALSQLdatabase Vacuum commandPosted: Wed Dec 02, 2009 9:09 
am                               
Joined: Sat Apr 19, 2008 12:44 pm
Posts: 287
Location: Dorset, UK              This could be very bad! Please see my post 
'Serious Bug in RB 2009 R5 - Transactions?'     
_________________
Simon Larkin
QiSQL Database Solutions
Website : http://www.qisql.com
Mac 10.5.8, Imac 2.4ghz, 4gb, RB 2009 R4  
                            Top               Shedrik           Post subject: 
Re: RB 2009 r5 -- REALSQLdatabase Vacuum commandPosted: Wed Dec 02, 2009 3:16 
pm                        
Joined: Tue Jan 29, 2008 12:24 pm
Posts: 7              And it's not just an incorrect error message.

My db file size is 2.3 MB.
After the vacuum command it should be ~20 KB (all rows was deleted).
But it still 2.3MB.   
                            Top               ruslan_zasukhin           Post 
subject: Re: RB 2009 r5 -- REALSQLdatabase Vacuum commandPosted: Fri Dec 04, 
2009 2:17 am                               
Joined: Sat Nov 28, 2009 3:12 am
Posts: 8              Shedrik wrote:And it's not just an incorrect error 
message.

My db file size is 2.3 MB.
After the vacuum command it should be ~20 KB (all rows was deleted).
But it still 2.3MB.

Hi Shedrik,

Why to worry about space of delete records? 

* I believe most DBs will reuse that space by new records. Sqllite reuse. 
Postgre seems not so good. So for Postgre it is required to call VACUUM 
periodically. 

* If you will think about life circle of a DB, you will see that it can
 * always grow
 * be pulsar -- 1000 recs added, 1000 deleted
 * grow by waves -- 1000 added, 500 deleted. Total +500.

* Read this: http://www.sqlite.org/lang_vacuum.html

It sounds that in SqlLite VACUUM works similar to db.Clone of Valentina DB -- 
new db is created in fact and valid data are copied.

But in your case, it sounds that you just want cleanup DB to get it with empty 
table(s). Right? 
Why not to use for this your func CreateDatabase() ?

* Why VACUUM of SqlLite not works or you -- this is other question ...     
_________________
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information 
http://www.paradigmasoft.com

[I feel the need: the need for speed]  
                            Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to