Page 1 of 1

How can I perform SWEEP by zeoslib API ?

Posted: 18.11.2008, 18:24
by Tommi
I need to perform manually sweep my embedded database using zeoslib.

How can I ?

Thank you

Posted: 18.11.2008, 19:10
by seawolf
Sweep command at the moment is not supported (and its implementation is not yet planned)

Posted: 18.11.2008, 20:50
by mdaems
What database, and what's a SWEEP? How should it be performed? Is there a SQL statement to do it or is an API call necessary?
A documentation link would be fine.
Probably I'll move this thread to the feature requests forum when I get an answer.

Mark

Posted: 19.11.2008, 12:14
by Tommi
SWEEP is a Firebird command.

When you delete a field in Firebird, it don't really delete it but simply mark it as deleted.
When you do sweep Firebird cleans all not necessary data from database and defragment so you have better performance and less hard disk space required.

Posted: 19.11.2008, 13:39
by mdaems
Thanks for the extra info. As seawolf wrote : this isn't yet implemented and not planned either.
I did some research now. To implement sweeping we must issue the isc_service_start( ) API call. This interface isn't available in the zeoslib plaindriver code yet, and my IB/FB experience is too limited to build this myself.

Functionally I would implement this the same way createnewdatabase is implemented : as a connection property. Adding 'sweep=true' to Connection.properties would perform a sweep upon connect.

Implementing this would at once provide an interface to do some other administration tasks (like validation and repair) as well.

Moved to Feature Requests, waiting for a FB guru to implement...

Mark