Subject RE: [firebird-support] how to reduce the file size of the database after large amount of deletes ref/eDN8072730811
Author Alan McDonald
> Well, the hole story is this.
> It is a trade application with sales with pos machines.
> When the database came bigger than 300mb, there are some lags during the
> day, in precise 5-10 seconds, 3 times per day, per pos machine. We can say
> that this is normal for a sql based application but too bad for pos
> machines, 5 seconds it is too much. It is about 50000 records on header
> table and 200000 on details table.
> For this reason I made 2 databases (files) in the same branch
> (shop). One is
> the 'main' of the branch and the other one database file 'pos' for pos
> machines, these 2 databases are synchronized successfully!
> Now, what I want is to delete the movements from pos database and reduce
> with someway the database file to actual filesize according the records
> where holds. So the pos machines will run better as the database is almost
> empty.
> What do you think?
> Regards
> Dennis

if your indexes are set up correctly, I would be surprised if you cannot
make the db perform as fast as an empty database with no indexes.
I tell my users that if they ever get the impression that my application is
slow, then it's my fault, not the fault of the amount of data they want to
You mention 50000 records in the "header" table etc... do you mean by this
that you want to drag all these records back to the client everytime they do
something? I would really be looking at your design if I were you. You're
right, a 5 second delay is intolerable but a reasonable design (both data
design and front-end design) should eliminate any sense of delay.